3.0.0 • Published 5 years ago

smart-table-json-pointer v3.0.0

Weekly downloads
150
License
MIT
Repository
github
Last release
5 years ago

smart-table-json-pointer

CircleCI

  1. Access nested property within an object
  2. Replace nested value with a new value

For nodejs and browsers.

Installation

npm

npm install --save smart-table-json-pointer

yarn

yarn add smart-table-json-pointer

Usage

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'}}}};
3.0.0

5 years ago

2.1.0

5 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

7 years ago

1.0.0

7 years ago