mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Adding splat[] short hand to collect,eval,map,omit,path,pick
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user