How to get a specific embedded document inside a MongoDB collection? [duplicate]

You can do this with mongo version higher 2.2

the query like this:

db.coll.find({ 'notes.title': 'Hello MongoDB' }, {'notes.$': 1});

you can try with $elemMatch like Justin Jenkins

Leave a Comment