Created
July 15, 2015 04:08
-
-
Save erikhazzard/4ce255b0f53e2b9dc6d5 to your computer and use it in GitHub Desktop.
set deep
This file contains 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
var _ = require('lodash'); | |
var a = {}; | |
_.set(a, 'a.b.c', 5); | |
console.log(a); | |
// output = { a: { b: { c: 5 } } } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment