I have following data structure:
db.objects
{
"_id" : 1,
"name" : "object name",
"type" : "rectangle",
"area" : {
"position_x1" : 0,
"position_y1" : 0,
"position_x2" : 0,
"position_y2" : 0
},
"dimension" : {
"width" : 0,
"height" : 0
}
}
I want to replace/update "area"
and "dimension"
separately for a document in objects collection with "_id"
= 1.
[?] Please let me know how can i achieve using MongoDB C# driver.