I have a MongoDB document like this :
{
"_id": ObjectId("5589044a7019e802d3e9dbc5"),
"sessionId": LUUID("f49d4280-ced0-9246-a3c9-a63e68e1ed45"),
"teamId": LUUID("6ef7d1a8-f842-a54c-bd8c-daf6481f9cfc"),
"variableId": LUUID("59d1b512-eee2-6c4b-a5b5-dda546872f55"),
"values": {
"725400": 691.0000000000000000,
"725760": 686.0000000000000000,
"726120": 683.0000000000000000,
"726480": 681.0000000000000000,
"726840": 679.0000000000000000,
"727200": 678.0000000000000000,
"727560": 677.0000000000000000,
"727920": 676.0000000000000000
},
"variableType": 2,
"isSet": false,
"teamNumber": 2,
"simPageIds": []
}
I have a scenario that I have to delete a particular property from the "values"
property of my document. for example, I want to delete value "727920"
from the "values"
property.
Since "Values"
is not an array, I can't use $pull
here. What I need is to remove
"727920" : 676.0000000000000000
from "values"
.
What is the right way to do that?