how to update all the documents of a mongo collection 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" } })