In MongoDB how do you use $set to update a nested value?
+1
A:
Using the dot notation:
db.people.update({ }, { $set: { "address.street": "Main Street" } })
Niels van der Rest
2010-09-30 07:04:12