mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 02:48:27 +08:00
Adding splat[] short hand to collect,eval,map,omit,path,pick
This commit is contained in:
@@ -14,6 +14,16 @@ var pickOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!map)::myMap: {hamster: squeak, cat: meow}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Pick splat",
|
||||
skipDoc: true,
|
||||
document: "{cat: meow, dog: bark, thing: hamster, hamster: squeak}\n",
|
||||
expression: `pick(["hamster", "cat"])[]`,
|
||||
expected: []string{
|
||||
"D0, P[hamster], (!!str)::squeak\n",
|
||||
"D0, P[cat], (!!str)::meow\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Pick keys from map",
|
||||
skipDoc: true,
|
||||
|
||||
Reference in New Issue
Block a user