For example, I have a document
{
_id: 1,
list:[
{
key: "a",
"value":"ssss"
},
{
key: "b",
"value":"ssss"
},
{
key: "c",
"value":"ssss"
},
]
}
and I need to remove the item with the key "c" from the list.
With the mongo console command, I do this and delete the correct key
db.test.update({{_id: 1},{"$pull" : {"list" : { "key" : "c"}}},false,false)
Is there any way to do this with morphine?
source
share