Answers for "find but return one fields mongodb"

Go
8

return only specific fields mongodb

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

find only one field mongodb

db.students.find({}, {roll:1, _id:0})
Posted by: Guest on March-19-2021

Browse Popular Code Answers by Language