In my MongoDB, I have a student collection with 10 records having fields name and roll. One record of this collection is:
name
roll
{ \"
Try the following query:
db.student.find({}, {roll: 1, _id: 0}).pretty();
Hope this helps!!