mongo db projection code example
Example 1: mongodb projection example
{ $project: { "field1": 0, "field2": 1, ... } }
Example 2: mongodb select fields
db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
{ $project: { "field1": 0, "field2": 1, ... } }
db.inventory.find( { status: "A" }, { item: 1, status: 1 } )