Closed
Description
Given an object obj
and an array arr
, in JavaScript, these statements are true:
arr['123'] === arr[123]
obj['123'] === obj[123]
Therefore, these paths should be equivalent:
var p1 = ['foo', '1']
var p2 = ['foo', 1]
However, json0
doesn't treat them as such. For example, this transformation fails:
const op1 = [{p: ['a', '1', 0], si: 'hi'}]
const op2 = [{p: ['a', 1], lm: 0}]
json0.transform(op1, op2, 'left')
Actual result: [{p: ["a", 2, 0], si: "hi"}]
Expected result: [{p: ["a", 0, 0], si: "hi"}]
Metadata
Metadata
Assignees
Labels
No labels