Changing Documents
Changing Documents: Updating and Deleting Documents.
Updated
- Updating and Deleting Documents (Apprentice): updateOne and updateMany change documents in place with update operators such as $set, $inc, $push and $pull, their result's matchedCount and modifiedCount say what happened, findOneAndUpdate gives back the changed document, and deleteOne removes one.