- Reference >
- Operators >
- Update Operators >
- Array Update Operators >
- $pushAll
$pushAll¶
-
$pushAll¶ -
The
$pushAlloperator is similar to the$pushbut adds the ability to append several values to an array at once.Here,
$pushAllappends the values in[ value1, value2, value3 ]to the array infield1in the document matched by the statement{ field: value }incollection.If you specify a single value,
$pushAllwill behave as$push.