The updateMany() method allows you to update all documents that satisfy a condition.
The following shows the syntax of the updateMany() method:
db.collection.updateMany(filter, update, options)
In this syntax:
- The filter is a document that specifies the condition to select the document for update. If you pass an empty document ({}) into the method, it’ll update all the documents the collection.
- The update is a document that specifies the updates to apply.



