Struggling with the use of $pop in a mongodb. Suppose I have the following collection:
`{_id:3
name: "item 1",
subdoc:{
array:[
{id: "999",
name:"bar"
},
{id: "777",
name:"foo-bar"
}
],
anotherproperty: "foo"
}
}`
Given it's id, I would like to remove an item from subdoc.array.
So for the document above, how can I remove the item with id="999", so that the only remaining item in subdoc.array would be the one with id="777"?