I want to update an existing item inside of an array in an array.
The structure of my document looks like the following:
{
"_id":"a1",
"projects":[{
"_id": "b1",
"title":"Title A",
"task":[
{"_id": "c1",
"title":"Title B"},
{"_id": "c2",
"title":"Title C"},
{"_id": "c3",
"title":"Title D"}
],
}]
}
Let's say we want to change the "task" :
{"_id": "c2",
"title":"Title C"}
to
{"_id": "c2",
"title":"Title C1"}
Does someone know a proper way to update this subdocument?