Package Exports
- js-pointer
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (js-pointer) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
js-pointer
Tiny, spec compliant implementation of the JSON Pointer spec RFC 6901 with 100% test coverage.
Getting started
Install via NPM
npm i js-pointer --savevar jsPointer = require('js-pointer');
var object = { one: { two: { three: [{ four: 4 }] } } }
jsonPointer.get(object, '/one/two/three/0/four') // returns 4Please see the spec and tests for further detail of the json pointer format.
API
jsPointer.get(object, pointer)
returns sub-object or value in object referred to by pointer
object
Plain object targeted by the pointer
pointer
string JSON pointer