Here is the solution
var mongo = require("mongoskin"); var conn = mongo.db(YOUR_DETAILS); var BSON = mongo.BSONPure;
this allows you to convert your int, string id or something else:
conn.collection(YOUR_COLLECTION).find({_id:new BSON.ObjectID(YOUR_ID)})
Hope this helps!
source share