mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-07 02:48:27 +08:00
Adding splat[] short hand to explode,collect,flatten,groupby,path,pivot,select and more
This commit is contained in:
@@ -11,6 +11,15 @@ var withOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (!!map)::a: {deeply: {nested: 'newValue'}}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "with splat",
|
||||
skipDoc: true,
|
||||
document: `a: {deeply: {nested: value}}`,
|
||||
expression: `with(.a.deeply.nested; . = "newValue" | . style="single")[]`,
|
||||
expected: []string{
|
||||
"D0, P[a], (!!map)::{deeply: {nested: 'newValue'}}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Update multiple deeply nested properties",
|
||||
document: `a: {deeply: {nested: value, other: thing}}`,
|
||||
|
||||
Reference in New Issue
Block a user