I have an array of ids and I want to get all document of them at once. For that I am writing but it return 0 records.
How can I search using multiple Ids ?
db.getCollection('feed').find({"_id" : { "$in" : [
"55880c251df42d0466919268","55bf528e69b70ae79be35006" ]}})
I am able to get records by passing single id like
db.getCollection('feed').find({"_id":ObjectId("55880c251df42d0466919268")})
ObjectId()like you do in the second example.db.getCollection('feed').find({"_id" : { "$in" : [ ObjectId("55880c251df42d0466919268"),ObjectId("55bf528e69b70ae79be35006") ]}})maybe works.