Answers for "mongodb return only some fields"

Go
5

return only specific fields mongodb

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

get only some fields of document in mongodb

db.student.find({}, {roll:1, _id:0})
 same as SELECT roll FROM student
Posted by: Guest on May-18-2021
0

mongoid collection return only specific fields

Map.only(:name).all
Posted by: Guest on July-04-2021

Code answers related to "mongodb return only some fields"

Browse Popular Code Answers by Language