MongoDB update operators that can be included inline in the data payload.
Any key starting with $ in the data object is automatically detected as an
update operator and applied with MongoDB semantics instead of the default $set.
Supported operators:
$inc — Increment a numeric field
$push — Append to an array
$pull — Remove from an array by condition
$addToSet — Add to array only if not present
$pop — Remove first (-1) or last (1) element from array
$unset — Remove a field from the document
$min — Update only if new value is less than current
$max — Update only if new value is greater than current
MongoDB update operators that can be included inline in the
datapayload.Any key starting with
$in the data object is automatically detected as an update operator and applied with MongoDB semantics instead of the default$set.Supported operators:
$inc— Increment a numeric field$push— Append to an array$pull— Remove from an array by condition$addToSet— Add to array only if not present$pop— Remove first (-1) or last (1) element from array$unset— Remove a field from the document$min— Update only if new value is less than current$max— Update only if new value is greater than current$mul— Multiply a numeric fieldExample