{
"_id":5150a1199fac0e6910000002,
"name":"some name",
"items":[
{
"id":23,
"name":"item name 23",
"childItems":[
{
"id":233,
"name":"item 233"
},
{
"id":234,
"name":"item 234"
}
]
},
{
"id":24,
"name":"item name 24",
"childItems":[]
}
]
}
I'm trying to update the 'document in array' of array. I have got the query to work on its parent (the stakeholder array) with the positional $ operator, using the answer to this question I asked previously. So my query looks like this.....
this.model.findOneAndUpdate( { items: { id: '23' } }, { $pull: { items: { childItems: { id: '223' } } } },).exec();