クエリをノードに変換します。マングースでの作業arrayfilterバージョンで、またはどのようにノードアプリでこれらを実行することができますArrayFilter in mongoose
db.getCollection('student').update(
{
"_id": ObjectId('5a377d62d21a3025a3c3aa49')
},
{
$set: {
"examples.$[i].isDeleted": true,
"examples.$[i].updatedAt": new Date(),
"updatedAt": new Date()
}
},
{
arrayFilters: [
{
"i._id": {
$in:[
ObjectId("5a377d62d21a3025a3c3aa4d"),
ObjectId("5a377d62d21a3025a3c3aa4c")
]
}
}
],
multi: true
}
)
https://docs.mongodb.com/manual/reference/operator/update/positional-filtered/
あなたの答えを更新してください。 –