mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 09:04:58 +08:00
Adding splat[] short hand to explode,collect,flatten,groupby,path,pivot,select and more
This commit is contained in:
@@ -11,6 +11,16 @@ var pivotOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], ()::- - foo\n - sis\n- - bar\n - boom\n- - baz\n - bah\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Pivot splat",
|
||||
skipDoc: true,
|
||||
document: "[[foo, bar], [sis, boom]]\n",
|
||||
expression: `pivot[]`,
|
||||
expected: []string{
|
||||
"D0, P[0], ()::- foo\n- sis\n",
|
||||
"D0, P[1], ()::- bar\n- boom\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Pivot sequence of heterogeneous sequences",
|
||||
subdescription: `Missing values are "padded" to null.`,
|
||||
|
||||
Reference in New Issue
Block a user