如果对象ID不匹配,我需要在第一个对象更新中添加地址,然后插入地址数组。
{
"_id" : ObjectId("5e0707d856cd5a1abcb7832f"),
"address" : [
{
"_id" : ObjectId("5e0727e87a21f51d3c5bf3bb"),
"fulladdress" : "aa,
"location" : "aa",
"name" : "aa",
"landMark" : "aa"
},
{
"_id" : ObjectId("5e0727e87a21f51d3c5bf3bb"),
"fulladdress" : "bb,
"location" : "bb",
"name" : "bb",
"landMark" : "bb"
}
],
}