Google Groups

How to convert BsonElement to BsonDocument in C#


trypsin Apr 29, 2012 9:11 AM
Posted in group: mongodb-user
I have a question like this:

my current bson document is like this:

{
_id: ********************
VehicleType: StarType
BrakeSystem: X Layout
}

and now I hope to put more information in the field of BrakeSystem
like this:


{
_id: ********************
VehicleType: StarType
 { BrakeSystem: X Layout, ABS: BOSCH ABS6}
}

so how can I convert the BsonElement to BsonDocument data? or Just
delete the original BrakeSystem field and nest the new BrakeSystem
document?