Question : mongodb show only one field
Answered by : obnoxious-okapi-8qtue5tlyev2
db.students.find({}, {roll:1, _id:0})
Source : https://stackoverflow.com/questions/25589113/how-to-select-a-single-field-for-all-documents-in-a-mongodb-collection | Last Update : Fri, 26 Mar 21
Question : how to display only one field in mongodb
Answered by : pankaj-garg-gyxg2fm1keqj
db.student.find({}, {_id:0})
Source : https://stackoverflow.com/questions/25589113/how-to-select-a-single-field-for-all-documents-in-a-mongodb-collection | Last Update : Wed, 05 Jul 23