mongodb mongoose match by ids 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 } } }