- Access nested property within an object
- Replace nested value with a new value
For nodejs and browsers.
npm install --save smart-table-json-pointer
``yarn add smart-table-json-pointer
import jsonPointer from 'smart-table-json-pointer'
const pointer = jsonPointer('foo.bar.woot');
pointer.get({foo:'value'});
// > undefined
pointer.get({foo:{bar:{woot:'value'}}});
// > 'value'
const target = {foo:{bar:{woot:{blah:'nut'}}}};
pointer.set(target,{ni:'bup'});
console.log(target);
// > {foo:{bar:{woot:{ni:'bup'}}}};