Complete implementation of JSON Pointer for Deno, as per IETF RFC6901
import * as jp from 'https://deno.land/x/json_pointer/mod.ts'
const obj = {
'foo': ['bar', 'baz'],
'qux': { 'quux': 'quuz' },
}
// jp.get(obj: object, pointer: string): any
jp.get(obj, '/foo/0') // 'bar'
jp.get(obj, '/qux/quux') // 'quuz'
jp.get(obj, '/hello') // undefined
// jp.set(obj: object, pointer: string, value: any): void
jp.set(obj, '/foo/1', 'becue') // obj.foo === ['bar', 'becue']
jp.set(obj, '/foo/-', 'bax') // obj.foo === ['bar', 'becue', 'bax']
jp.set(obj, '/new/path', 'val') // obj.new === { path: 'val' }
git clone https://github.com/dansalias/json_pointer
cd ./json_pointer
deno test