Adding splat[] short hand to explode,collect,flatten,groupby,path,pivot,select and more

This commit is contained in:
Mike Farah
2024-06-16 10:48:01 +10:00
parent f1964dece0
commit d58870b056
14 changed files with 146 additions and 13 deletions
+9
View File
@@ -11,6 +11,15 @@ var withOperatorScenarios = []expressionScenario{
"D0, P[], (!!map)::a: {deeply: {nested: 'newValue'}}\n",
},
},
{
description: "with splat",
skipDoc: true,
document: `a: {deeply: {nested: value}}`,
expression: `with(.a.deeply.nested; . = "newValue" | . style="single")[]`,
expected: []string{
"D0, P[a], (!!map)::{deeply: {nested: 'newValue'}}\n",
},
},
{
description: "Update multiple deeply nested properties",
document: `a: {deeply: {nested: value, other: thing}}`,