- Reference >
- Operators >
- Update Operators >
- Array Update Operators >
- $each
$each¶
Note
The $each modifier is only used with the
$addToSet and $push operators.
See the documentation of $addToSet and $push
for more information.
-
$each¶ The
$eachmodifier is available for use with the$addToSetoperator and the$pushoperator.Use the
$eachmodifier with the$addToSetoperator to add multiple values to an array<field>if the values do not exist in the<field>.Use the
$eachmodifier with the$pushoperator to append multiple values to an array<field>.