$push
Add new elements to an array field in the specified column. The $push method appends one or more values to an existing array without replacing the entire array. For example, if the current value of a column is ["apple", "banana"] and you use $push: "cherry" or $push: $each: ["cherry"], the updated array becomes ["apple", "banana", "cherry"]. This is useful for maintaining and expanding lists within database records.
Last updated