I have mongodb collection with below documents.
I wanted to update phone = 9876054321 where Email = xyz@gmail.com in Nodejs mongoose. My results should be like below.
if the Model created correctly, just try
await Model.updateMany({ Email : "xyz@gmail.com" }, { phone : 9876054321 });
let result = await Model.find({Email : "xyz@gmail.com"}).lean();
console.log(result)