MongoDB Documentation, Release 3.0.4 Remove a Single Document that Matches a Condition 3.3.5 Limit Fields to Return from a Query Return All Fields in Matching Documents Return Specified Fields Only Return the Specified Fields and the _id Field Only 107 3.3. MongoDB CRUD Tutorials You can remove the _id field from the results by specifying its exclusion in the projection, as in the following example: A projection can explicitly include several fields. In the following operation, find() method returns all documents that match the query. In the result set, only the item and qty fields and, by default, the _id field return in the matching documents. This operation will return all documents in the inventory collection where the value of the type field is ’food’ . The returned documents contain all its fields. If you specify no projection, the find() method returns all fields of all documents that match the query. This tutorial offers various query examples that limit the fields to return for all matching documents. The examples in this tutorial use a collection inventory and use the db.collection.find() method in the mongo shell. The db.collection.find() method returns a cursor (page 64) to the retrieved documents. For examples on query selection criteria, see Query Documents (page 96). You cannot combine inclusion and exclusion semantics in a single projection with the exception of the _id field. The projection document limits the fields to return for all matching documents. The projection document can specify the inclusion of fields or the exclusion of fields. The specifications have the following forms: Important: The _id field is, by default, included in the result set. To suppress the _id field from the result set, specify _id: 0 in the projection document. To delete a single document sorted by some specified order, use the findAndModify() method. To remove a single document, call the remove() method with the justOne parameter set to true or 1 . The following example removes one document from the inventory collection where the type field equals food : Syntax Description <field>: <1 or true> Specify the inclusion of a field. <field>: <0 or false> Specify the suppression of the field. db.inventory.remove( { type : "food" }, 1 ) db.inventory.find( { type: 'food' } ) db.inventory.find( { type: 'food' }, { item: 1, qty: 1 } ) db.inventory.find( { type: 'food' }, { item: 1, qty: 1, _id:0 } )