$[]

The `$[]` all positional operator updates all elements in an array for the documents that match the query condition.

Syntax

{ "array.$[]": <value> }

Parameters

arraystringrequired

The array field name.

<value>stringrequired

The new value for all array elements.