Get particular element from mongoDB array [duplicate]

The MongoDB query language is designed to return all matching Documents.

There is no support for returning only sub-documents.

This issue has an outstanding ticket in MongoDB’s ticket tracker.


UPDATE: it looks like the ticket has been marked as fixed.

See here for an example of how to use this.

Leave a Comment