mongodb如何更新数组中数组的元素

时间:2017-03-03 10:10:11

标签: arrays mongodb updates

我想在监护人中更新手机, 该文件采用以下形式

{
    "_id" : ObjectId("575e4d850d61a206084ff035"),
    "students" : [
            {
                    "_id": "58454c8fd01c35cb06ac1d7c",
                    "guardians": [
                         {
                             _id: "5710b9dbb6744ac07aee6a6d",
                             contact: {
                                 mobile: "15800000000"
                             }
                         }
                         ...
                     ]
            }
            ...
       ]
}

1 个答案:

答案 0 :(得分:0)