I have an array like this :
Array<int> arr = [1,3,98,12,...]
and I want to get all documents having Id which belongs to that array
db.collection.find({"key": arr})
It would be crazy to use
for (int i=1; i<= arr.length(); i++)
{
db.collection.find({"key": i})
}
Instead, please help me if you know an effective way. Thanks !