MongoDB - Update ein Objekt in geschachtelte Array

{
  "_id": "xPBc4By8FemDwTPqH",
  "u": {
    "_id": "6PoZawHZcQz4Gwzcv",
    "username": "michael"
  },
  "friends": [
    {
      "u": {
        "_id": "eGqDjAjjtYADbuSnn",
        "username": "michael",
        "name": "michael"
      }
    },
    {
      "u": {
        "_id": "k4gKCGwYryXDMMHvs",
        "username": "joyce",
        "name": "joyce"
      }
    }
  ]
}

Will ich update den Namen "Freunde.u.username": "michael" 's name ist "Hallo", wie ich brauche, es zu tun.

InformationsquelleAutor | 2015-12-23

Schreibe einen Kommentar