I have two documents with "Name" values "Raja_5" and "Raja_6". I have written the following codes to update the city in two documents.
collection.update({"Name":{"$in":["Raja_5","Raja_6"]}},{"$set":{"City":"Hyd"}})
(or)
collection.update({"$or":[{"Name":"Raja_5"},{"Name":"Raja_6"}]},{"$set":{"City":"Hyd"}})
But the document with "Raja_5" is getting updated but not the other document in both the cases.
Please help me.