Adding splat[] short hand to collect,eval,map,omit,path,pick

This commit is contained in:
Mike Farah
2024-06-16 10:22:42 +10:00
parent 45eda8dbae
commit f1964dece0
8 changed files with 77 additions and 8 deletions
+10
View File
@@ -23,6 +23,16 @@ var pathOperatorScenarios = []expressionScenario{
"D0, P[a b], (!!seq)::- a\n- b\n",
},
},
{
description: "Map path",
document: `{a: {b: cat}}`,
skipDoc: true,
expression: `.a.b | path[]`,
expected: []string{
"D0, P[a b 0], (!!str)::a\n",
"D0, P[a b 1], (!!str)::b\n",
},
},
{
skipDoc: true,
document: `a: