SQL Reference
UPDATEONE
db.collection.updateOne(filter, update, options)
Section titled “db.collection.updateOne(filter, update, options)”- filter: The selection filter for the document to update.
- update: Update operators, or an aggregation pipeline, describing the changes.
- options: Optional settings such as upsert and arrayFilters.
Example
Section titled “Example”db.users.updateOne({ _id: 1 }, { $set: { active: false } })