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
+10
View File
@@ -22,6 +22,16 @@ var splitDocOperatorScenarios = []expressionScenario{
"D1, P[1], (!!map)::{b: dog}\n",
},
},
{
description: "Split splat",
skipDoc: true,
document: `[{a: cat}, {b: dog}]`,
expression: `.[] | split_doc[]`,
expected: []string{
"D0, P[0 a], (!!str)::cat\n",
"D1, P[1 b], (!!str)::dog\n",
},
},
}
func TestSplitDocOperatorScenarios(t *testing.T) {