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
More Related Contents:
- Does MongoDB’s $in clause guarantee order
- Find document with array that contains a specific value
- Authentication failure while trying to save to mongodb
- Possibility of duplicate Mongo ObjectId’s being generated in two different collections?
- Mongodb sort inner array
- Converting string to date in mongodb
- MongoDB wildcard in the key of a query
- How to create a DB for MongoDB container on start up?
- How to access a preexisting collection with Mongoose?
- How do I query for distinct values in Mongoose?
- MongoDB field order and document position change after update
- MongoDB Full and Partial Text Search
- How to enable authentication on MongoDB through Docker?
- Mongodb Join on _id field from String to ObjectId
- Difference between count() and find().count() in MongoDB
- How do I do a “NOT IN” query in Mongo?
- How to efficiently perform “distinct” with multiple keys?
- Remove embedded document in a nested array of documents
- Find all documents within last n days
- Unable to create/open lock file: /data/mongod.lock errno:13 Permission denied
- Mongo, find through list of ids
- MongoDB: Server has startup warnings ”Access control is not enabled for the database”
- Mongo group and push: pushing all fields
- How to stop insertion of Duplicate documents in a mongodb collection
- Difference between “id” and “_id” fields in MongoDB
- MongoDB nested array query
- Filtering embedded documents in MongoDB
- Is mongodb running?
- What is the difference between save and insert in Mongo DB?
- MongoDB not equal to