In MongoDB how do you use $set to update a nested value?
$set
For example, consider a collection people with the following
In addition to Niels' answer, also do verify the "type" of the nested value. In my case, it was a "string" formed from json. Though this might be unlikely, but do ensure that the value has the right type.