objectName
(String)_id
and object
properties.context
(Object)pipeline
argument. The pipeline must be in the form of an array and named aggregation steps ([{$match: {...}}, {$project: {...}}, ...]
). A pipeline can also be built later using aggregation cursor chaining.pipeline
(Object[])match
(Object) Optional match filter document.match
filter.match
(Object) Optional match filter document.match
filter.match
(Object) Match filter document.doc
(Object) The document to insert.id
(ObjectID) The identifier of the instance to update.to
(ObjectID|String) The identifier or email of the new owner account.to
.match
filter.$set
and $push
operations support updating existing document array elements by including their identifiers (e.g. push 2 items into c_arr of a specific document in the c_docs document array: { $push: {c_docs: {_id: '599284e01c9e955ff7526793', c_arr: [1, 2] }}}
).$unset
operations can remove properties buried in specific documentsmatch
(Object) Optional match filter document.doc
(Object) An object containing the changes to effect. Update supports $set, $push, $unset and $remove.$set
Contains properties to update. (e.g. {$set: {name: {first: 'Auric', last: 'Goldfinger'}}}
)$push
Contains items to push into arrays and document arrays (e.g. {$push: {c_names: ['Jill Masterson']}}
)$unset
Unset one or more deletable properties (e.g. {$unset: {'c_doc.59928b74341a65ef3f03842b.c_deletable': 1, c_remove_me: 1}}
).$remove
Removes elements from arrays, by full path (e.g. remove 2 documents from c_doc_array by identifier and all 1 and 2 values from c_num_arr in the c_doc_array document with an identifier of 59928b74341a65ef3f03842b: $remove: {'c_doc_array': ['59928aed341a65ef3f03836a', '59928af9341a65ef3f038380'], 'c_doc_array.59928b74341a65ef3f03842b.c_num_arr': [1,2] }
)