Closed whitlockjc closed 1 month ago
I ran into an issue where deeply nested arrays could end up with the wrong computed key for GetWithPaths. Example below:
GetWithPaths
Example JSONPath
$.o1.a1[*].a2[?(@.p1 == "v1")]
Example Document
{ "o1": { "a1": [ { "a2": [ { "p1": "v1" }, { "p2": "v2" }, { "p1": "v1" } ] }, {}, { "a2": [ { "p1": "v1" }, { "p2": "v2" }, { "p1": "v1" } ] } ] } }
Current Keys
$["o1"]["a1"]["a2"]["0"]["2"]
$["o1"]["a1"]["a2"]["2"]["2"]
Expected Keys
$["o1"]["a1"]["0"]["a2"]["0"]
$["o1"]["a1"]["0"]["a2"]["2"]
$["o1"]["a1"]["2"]["a2"]["0"]
$["o1"]["a1"]["2"]["a2"]["2"]
I ran into an issue where deeply nested arrays could end up with the wrong computed key for
GetWithPaths
. Example below:Example JSONPath
Example Document
Current Keys
$["o1"]["a1"]["a2"]["0"]["2"]
$["o1"]["a1"]["a2"]["2"]["2"]
Expected Keys
$["o1"]["a1"]["0"]["a2"]["0"]
$["o1"]["a1"]["0"]["a2"]["2"]
$["o1"]["a1"]["2"]["a2"]["0"]
$["o1"]["a1"]["2"]["a2"]["2"]