{
"_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"
}
]
}
I want to update flag value to 1 for all the filecontent.flag using _id and filecontent.flag : 0 . I used filecontent.$.flag operator which update first matching. But I want to update all the flag objects.