select two fields in list mongodb code example
Example 1: mongodb select fields
db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
Example 2: get custom fields in result of mongodb query
db.inventory.find( { age: "10" }, { _id: 0 , age: 1, user: { name: 1 } } )
Example 3: mongodb find multiple fields
{ <field1>: <value>, <field2>: <value> ... }