Hi,
I have created a Document with nested Object like this:
db.inventory.insert(“size”: {“h”: 10, “w”: 15.25, “uom”: “cm”});
and Now I want to find within the Collection “inventory” - such document whose ‘size’ with ‘h’ greater than 5.
My problem is - I tried with this command -
db.inventory.find({“size:h”:{$gt:5}});
It doesn’t show the required document within “inventory”.
I guess the issue is with the name of the field->size, since it is already in double quotes.
Can anyone help me how to get this fetched?