Created
March 3, 2017 14:39
-
-
Save muhammadghazali/972f1ecbc419f613242d30180de139c2 to your computer and use it in GitHub Desktop.
Taking note the $set behavior
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let update = { | |
$set: { | |
hello: { | |
world: 'anything' | |
} | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let update = { | |
$set: { | |
// only update the world field inside the `hello` | |
'hello.world': 'anything' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment