For AI agents: a documentation index is available at https://www.mongodb.com/es/docs/llms.txt — markdown versions of all pages are available by appending .md to any URL path.

Array Update Modifiers

The following modifiers change how the $push and $addToSet operators update arrays:

Name
Description

Modifies the $push and $addToSet operators to append multiple items for array updates.

Modifies the $push operator to specify the position in the array to add elements.

Modifies the $push operator to limit the size of updated arrays.

Modifies the $push operator to reorder documents stored in an array.

Rate this page