json-pointer.js
1.0.0 • Public • Published
var doc = {
"foo": "bar"
};
jsonpointer.find(doc, '/foo');
// returns 'bar'
jsonpointer.has(doc, '/foo');
// returns true
jsonpointer.set(doc, '/hello', 'world');
// adds {"hello": "world"} to doc
jsonpointer.remove(doc, '/foo');
// deletes "foo" property from doc and returns its value "bar"
jsonpointer.parse('/foo/bar/hello');
// returns ['foo', 'bar', 'hello'];
jsonpointer.serialize(['foo', 'bar', 'hello']);
// returns ('/foo/bar/hello');
Dependencies (0)
Dev Dependencies (0)
Package Sidebar
Install
Weekly Downloads