Remove subdocument from document
I would like to remove the Path object from the document. I tried to use
the $unset operator but it demands value which I don't have to give. Is
there a way to remove a whole sub document from document?
{
"Address" : {
"Country" : "Israel",
"City" : "Tel-Aviv",
"Street" : "Shmryihu Levin",
"House" : "16",
"Apartment" : "8"
},
"Birthday" : {
"Date" : {
"Day" : "3",
"Moth" : "8",
"Year" : "1985"
}
},
"ConnectionStatus" : "Offline",
"DisplayName" : "Shaolin Rabbi",
"Email" : "alextilk@gmail.com",
"FirstName" : "Alex",
"LastName" : "Tilkin",
"Password" : "1985",
"Path" : {
"Start" : {
"Longtitude" : 400,
"Latitude" : 300
},
"End" : {
"Longtitude" : 500,
"Latitude" : 400
},
"Milestones" : [
{
"Longtitude" : 420,
"Latitude" : 320
},
{
"Longtitude" : 450,
"Latitude" : 350
},
{
"Longtitude" : 480,
"Latitude" : 380
}
]
},
"ProgressStatus" : "Safe",
"_id" : ObjectId("5201cadc5b4da1f65a000001")
}}
No comments:
Post a Comment