Suppose I have the following document:
{
_id: "609bcd3160653e022a6d0fd8",
companies:{
apple: [
{
product_id: "609bcd3160653e022a6d0fd7"
},
{
product_id: "609bcd3160653e022a6d0fd6"
}
],
microsoft: [
{
product_id: "609bcd3160653e022a6d0fd5"
},
{
product_id: "609bcd3160653e022a6d0fd4"
}
]
}
}
How can I find and delete the object with the product_id: "609bcd3160653e022a6d0fd4"
.
P.S: I use MongoDB native driver for Nodejs.
Thanks a lot!