In my MongoDB, I have a student collection with 10 records having fields name and roll. One record of this collection is:
name
roll
{ \"
I think mattingly890 has the correct answer , here is another example along with the pattern/commmand
db.collection.find( {}, {your_key:1, _id:0})
Try the following query:
db.student.find({}, {roll: 1, _id: 0}).pretty();
Hope this helps!!