Answers for "how to project specific field mongodb nodejs"

4

mongodb select fields

db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
Posted by: Guest on September-24-2020
0

how to project specific field mongodb nodejs

db.inventory.find( { status: "A" }, { item: 1, status: 1 } )
//1 to show and 0 to hide
//_id always included need to be set to 0 if not needed
Posted by: Guest on December-19-2020
0

get custom fields in result of mongodb query

db.inventory.find( { age: "10" }, { _id: 0 ,  age: 1, user: { name: 1 } } )
Posted by: Guest on December-08-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language