{
"_id" : "x2Yp4hnK8mvHhdYn4",
"fileid" : "kcSMLyR4wZc2gMADq",
"filepath" : "E:/sample/file4.txt",
"filecontent" : [
{
"path" : "file4.txt",
"flag" : 0,
"randno" : "UbEsfTKin9"
},
{
"path" : "copy.txt",
"flag" : 0,
"randno" : "fcMQU7wk3c"
},
{
"path" : "about.txt",
"flag" : 0,
"randno" : "kBdKtHu8qQ"
}
]
}
我想使用_id和filecontent.flag:0将所有filecontent.flag的标志值更新为1。我使用了filecontent。$。标志运算符,它更新了第一个匹配。但我想更新所有标志对象。