$push adds an element to the document array and automatically adds the array if there is no array.
Db.foo.update ({},{"$push": {"Users": 1}}) adds a 1 element to the end of the users array
Db.foo.update ({},{"$push": {"users": {"$each": []}}) adds multiple elements to the end of the users array, to $each with
$addToSet can avoid inserting duplicate elements, with $each, you can add multiple different values, and the array modifier is slow because the document size may change
$pop remove elements from the head or tail
$pull Delete the element that satisfies the condition, not just delete a
By default, updates can only be performed on the first document that matches the matching criteria, and if multiple documents meet the criteria, only the first document is updated and the other documents are not changed.
To update all matching documents, you can set the fourth parameter of update to True
Db.foo.update ({},{"$set": {name: ' tes '}},false,true)
MongoDB Array Manipulation