chbrown / rfc6902

Complete implementation of RFC6902 in TypeScript
https://chbrown.github.io/rfc6902/
326 stars 39 forks source link

Pointer#set doesn't handle deep paths #96

Closed dalle closed 11 months ago

dalle commented 1 year ago

This fails:

const input: any = {obj: {obj2: {a: 'A', b: 'B'}}}
Pointer.fromJSON('/obj/obj2/c').set(input, 'C')
t.deepEqual(input.obj.obj2.c, 'C')