Fixes nested array indexing #824

This commit is contained in:
Mike Farah
2021-05-21 14:18:24 +10:00
parent 77edbb9f5c
commit d18a6963f6
4 changed files with 47 additions and 3 deletions
+16
View File
@@ -27,6 +27,22 @@ foobar:
`
var traversePathOperatorScenarios = []expressionScenario{
{
skipDoc: true,
document: `[[1]]`,
expression: `.[0][0]`,
expected: []string{
"D0, P[0 0], (!!int)::1\n",
},
},
{
skipDoc: true,
document: `[[[1]]]`,
expression: `.[0][0][0]`,
expected: []string{
"D0, P[0 0 0], (!!int)::1\n",
},
},
{
description: "Simple map navigation",
document: `{a: {b: apple}}`,