Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb mongoose match by ids

ids = ids.map(function(el) { return mongoose.Types.ObjectId(el) })
{ "$match": { "_id": { "$in": ids } } }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mongodb #mongoose #match #ids
ADD COMMENT
Topic
Name
6+4 =