You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While update works great when you want to assign some value or merge a newly updated object tree with older one, it doesn't work that great for adding/removing items from an array.
So for adding one item into and array, use addToSet method, for removing, use removeFromSet method. Typical use case is if you have tags on your documents.