tags:

views:

7

answers:

1

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