mongodb query project all fields in find code example
Example 1: mongodb select fields
db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
Example 2: mongodb project all fields
db.collection.aggregate([
{ "$addFields": { "custom_field": "$obj.obj_field1" } }
])