I have multiple document to update in mongodb , each document has to be updated with different value . Values to update is available in a JSON array .
{_id :1 ,name :'A','place':'London'},
{_id :2 ,name :'B','place':'UK'},
{_id :3 ,name :'C','place':'USA'},
{_id :4 ,name :'D','place':'CANADA'},
{_id :5 ,name :'E','place':'India'}
JSON array to update :
[{_id :1 ,name :'l','place':'Indonesia'},{_id :2 ,name :'B','place':'UAE'}]
I have to update _id 1,2 of my collection with new value in json array . How can I do it without iterating json array and in one query .