How do you delete one value in MongoDB as opposed to an entire key?
For example I have a key "hello" that contains the following data:
> db.Data.find({'id': 'hello'}, {'_id':0}).pretty()
{
"id" : "hello",
"Foo" : BinData(0,"1="),
"Bar" : BinData(0,"1="),
"Baz" : BinData(0,"1=="),
}
Now If I try to filter for a value "Foo" in my delete statement it does not delete.
> db.fileData.deleteOne({"id": "hello", "Foo": 0})
{ "acknowledged" : true, "deletedCount" : 0 }
I just want to delete one value "Foo" not the entire key "hello", how do you do this?