update property
Must specify either the remove or the update field. Performs an update of the selected document.
- If passed a document with update operator expressions, findAndModify performs the specified modification.
- If passed a replacement document {
- starting in MongoDB 4.2, if passed an aggregation pipeline
<stage1>, <stage2>, ...
, findAndModify modifies the document per the pipeline. The pipeline can consist of the following stages:- $addFields and its alias $set
- $project and its alias $unset
- $replaceRoot and its alias $replaceWith.
It can be a Map or a List
Implementation
Object? update;