match id in mongoose code example
Example: mongodb mongoose match by ids
ids = ids.map(function(el) { return mongoose.Types.ObjectId(el) })
{ "$match": { "_id": { "$in": ids } } }
ids = ids.map(function(el) { return mongoose.Types.ObjectId(el) })
{ "$match": { "_id": { "$in": ids } } }