The following operators modify the contents of an array:
Name | Description |
|---|---|
Adds elements to an array only if they do not already exist in the set. | |
Removes the first or last item of an array. | |
Removes all array elements that match a specified query. | |
Removes all matching values from an array. | |
Adds an item to an array. |
To update specific array elements, you can also use the positional update operators or the arrayFilters option.