Push one item onto an array field.
Section: Arrays and positional updates
Append to an array
javascript
javascript
db.users.updateOne({ _id: 1 }, { $push: { tags: "beta" } })Explanation
`$push` appends a value even if it already exists.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Arrays and positional updates
Update the first matching array element
Use the positional `$` operator.
Target specific nested elements with arrayFilters
Update matching array elements with named filters.