Documents and Collections "Code:": "SEA", "IndepYear": 1967, "geography": { "Region": "British Islands", "Continent": "Europe", "SurfaceArea": 193 }, "government": { "HeadOfState": "Michael Bates", "GovernmentForm": "Monarchy" }, "demographics": { "Population": 27, "LifeExpectancy": 79 } } To append an element to an array field, or insert, or delete elements in an array, use the  arrayAppend() , arrayInsert() , or  arrayDelete()  methods. The following examples modify the  countryinfo collection to enable tracking of international airports. The first example uses the  modify()  and  set()  methods to create a new Airports field in all documents. Use care when you modify documents without specifying a search condition; doing so modifies all documents in the collection. mysql-js>  db.countryinfo.modify("true").set("Airports", []) With the Airports field added, the next example uses the  arrayAppend()  method to add a new airport to one of the documents.  $.Airports  in the following example represents the Airports field of the current document. mysql-js>  db.countryinfo.modify("Name = ’France’").arrayAppend("$.Airports", "ORY") Use  find()  to see the change. 3855 mysql-js>  db.countryinfo.find("Name = ’France’") { "GNP": 1424285, "_id": "00005de917d80000000000000048", "Code": "FRA", "Name": "France", "Airports": [ "ORY" ], "IndepYear": 843, "geography": { "Region": "Western Europe", "Continent": "Europe", "SurfaceArea": 551500 }, "government": { "HeadOfState": "Jacques Chirac", "GovernmentForm": "Republic" }, "demographics": { "Population": 59225700, "LifeExpectancy": 78.80000305175781 } } Append, Insert, and Delete Arrays Caution