In Ruby, how can I traverse an arbitrary document retrieved from a collection using something like mongomapper? Let’s say the document looks something like this:
mydocs = [{
"title": "my title",
"description": "hello world",
"comments": [{
"user": "me",
"text": "this"
}, {
"user": "him",
"text": "that"
}]
},
{
.....
}
]
1 Answer