Using node/mongodb/mongoose, how do I retrieve a set of records via an array list of their IDs.
Have had no luck with:
var ids = ['50829a8f558866ad21000921',
'50829a8f558866ad21000920',
'50829a8f558866ad2100091d',
'50829a8f558866ad21000915',
'50829a8f558866ad2100090b',
'50829a8f558866ad21000906'];
Schema
.find()
.in("_id", ids)
.run(callback);
Guessing Query.in() is not the way to go.
Got it...
Schema
.find({"_id": {$in: ids}})
.run(callback);