how to update the existing field in all the objects mongodb code example
Example: mongo change all documents on field
//Update all documents with "oldName" to "newName"
db.names.updateMany({ "name": "oldName" }, { $set: { "name" : "newName" } })
//Update all documents with "oldName" to "newName"
db.names.updateMany({ "name": "oldName" }, { $set: { "name" : "newName" } })