翻译或纠错本页面

$pushAll

$pushAll

2.4 版后已移除: Use the $push operator with $each instead.

The $pushAll operator appends the specified values to an array.

The $pushAll operator has the form:

{ $pushAll: { <field>: [ <value1>, <value2>, ... ] } }

If you specify a single value, $pushAll will behave as $push.

←   $pull $push  →