how to update all documents in a 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" } })