Insert ein neues Objekt in ein Unterdokument-Array-Feld in mongoose

[{
    "_id" : ObjectId("579de5ad16944ccc24d5f4f1"),
    "dots" : 
    [
        {
            "id" : 1,
            "location" : 
            [
                 {
                    "lx" : 10,
                    "ly" : 10
                 }
            ]
        },
        {
            "id" : 2,
            "location" : [{}]
        }
    ]
}]

Above ist das json-Format des Modells (von mongobooter), sagen wir "lines", und ich habe _id und dots.id, und ich möchte ein neues Objekt in location hinzufügen. Wie kann ich das dann tun (mit Mungo)?

Antworten auf die Frage(2)

Ihre Antwort auf die Frage