Reputation:
I have to update password field against specific email-id .
When run this query :
db.user_account.update({"password":"1233465"},{$set:{"password": "1233"}}
it will update every password value in user_account
(collections) but i want to filter collection based on email-id then on a specific email-id i want update old password with new password using python....
Upvotes: 1
Views: 451
Reputation: 62868
First parameter of update
is the filtering query. Assuming you use pymongo
:
db.user_account.update({"email-id": "specific"}, {"$set": {"password": "1233"}})
Upvotes: 1