I am trying to get the value of an element in a nested Bson document using MongoDB driver. The document outline is something like this:
_id >> 1-4OUKQQ
type >> person
name >> john
surname >> blogg
details >> { "sid" : "456", "height" : "1.8m"}
I would like to "get the value" of "height" which is a nested list of elements in the document. I would like to do something like
mHeight = element.details.height
and get a value of "1.8m"
without the need to do expensive looping to find the value of element = detail.height
n/a please see above.