projection not working with db.collection.find in mongo [duplicate]
This question already has an answer here: batchSize field name ignored in Field Projection 2 answers I have started to use mongodb just a day back and have encountered an issue. I searched on net and stackoverflow for how to hide _id value in final answer and following the answers provided I tried to get my code run but still the _id part shows. P.S.: I am using cloud9 as the ide. var mongo = require('mongodb').MongoClient; mongo.connect('mongodb://localhost:27017/learnyoumongo', function(err, database) { if(err) throw err; const db = database.db('learnyoumongo'); var parrots = db.collection(