mongodb - How can I search for all documents with _id in an array? -
i want search documents _id
in array of id's. here have far, returning nothing:
var myarray = [53950fe210bcef043aa6e135, 5394f5be2f6953083908db47]; user.find( {_id: { $in : myarray }}, null, {}, function (err, data) { if (!err){ homecoming res.json(data); } } );
what doing wrong?
mongodb mongoose
No comments:
Post a Comment