I have array of _id's like
arr=["xxxx","yyyyy",zzzz"]
NOw I want to return all the docs of these ids from a collection like
coll.find({_id:{$in:{arr}})//must return xxx.yyy.zzz docs
this is returning all fields from collection, How to do this?
these are my docs
{_id:"xxx",
bvalue:"val",
cval:"val"
}
{_id:"yyy",
bvalue:"val",
cval:"val"
}
{_id:"zzz",
bvalue:"val",
cval:"val"
}
I need a query which returns all documents with id's in array
In my array I have id's xxx,yyy,zzz
so I want all these docs to return