nester
v0.0.5
Published
Get and set properties from deeply nested arrays
Downloads
16
Readme
nester - A nested object getter/setter
Usage:
var nester = require('nester');
var nestedObj = {a:{b:{c:{d:42}}}}
var res = nester(nestedObj, 'a.b.c.d'); // getting
console.log(res) // 42
nester(nestedObj, 'a.some.other.path[0]', 42);
console.log(nestedObj.a.some.other.path[0]); // 42
Testing:
npm install
npm test