mongodb all fields code example
Example 1: operator to return specific data of a mongodb query
db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
Example 2: mongodb filter include all other fields
use $addFields instead of $project
db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
use $addFields instead of $project