Ich habe folgende Mongo Unter DokumentMongoDB Update-Abfrage vorhandenes Feld in ein Array setzen
"location" : { "zipCode" : "90670", "lat" : "33.942669", "lng" : "-118.074384", "city" : "Santa Fe Springs", "state" : "California", "streetAddress" : "12131 Telegraph Road, 2nd Floor", }
Kann jemand mir empfehlen Update-Abfrage oder Knotenfunktion mongo das folgende Dokument
"location" : { "zipCode" : "90670", "city" : "Santa Fe Springs", "state" : "California", "streetAddress" : "12131 Telegraph Road, 2nd Floor", "geo" : { "type" : "Point", "coordinates" : [ 33.942669 ,-118.074384 ] } }
Auch können Sie so etwas wie db.collection.update tun ({x: 1}, {$ unset: {x: '', y: ''}, $ set: {punkt: {x: 1, y: 2}}}) vom Client. – LuisFMorales