mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 00:54:51 +08:00
Adding splat[] short hand to explode,collect,flatten,groupby,path,pivot,select and more
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user