_.set(object, path, value)
varobject= { 'a': [{ 'b': { 'c': 3 } }] }; _.set(object, 'a[0].b.c', 4); console.log(object.a[0].b.c); // => 4_.set(object, ['x', '0', 'y', 'z'], 5); console.log(object.x[0].y.z); // => 5
_.set(object, path, value)
varobject= { 'a': [{ 'b': { 'c': 3 } }] }; _.set(object, 'a[0].b.c', 4); console.log(object.a[0].b.c); // => 4_.set(object, ['x', '0', 'y', 'z'], 5); console.log(object.x[0].y.z); // => 5