mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 17:36:59 +08:00
Env Ops!
This commit is contained in:
@@ -54,6 +54,15 @@ var traversePathOperatorScenarios = []expressionScenario{
|
||||
"D0, P[{}], (!!str)::frog\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Dynamic keys",
|
||||
subdescription: `Expressions within [] can be used to dynamically lookup / calculate keys`,
|
||||
document: `{b: apple, apple: crispy yum, banana: soft yum}`,
|
||||
expression: `.[.b]`,
|
||||
expected: []string{
|
||||
"D0, P[apple], (!!str)::crispy yum\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "Children don't exist",
|
||||
subdescription: "Nodes are added dynamically while traversing",
|
||||
|
||||
Reference in New Issue
Block a user