mongoose match docs with element in id 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 } } }