How to access dynamic variables in expression #1252
Unanswered
dnyaneshwarjadhav
asked this question in
Q&A
Replies: 1 comment
-
You need to use the
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How to use dynamic variables in expression
myres.txt
[
{
"name": "test-001",
"is_preconfigured": true,
},
{
"name": "my-connector",
"is_preconfigured": 3
},
{
"name": "checkerfrom_default2_002",
"is_preconfigured": false,
}
]
When i use direct command
yq e '. | .[].name | select(. == "my-connector")' myres.txt
This gives me result as my-connector
But when I use following way
NAME_IN_YAML="my-connector"
This is blank result
Beta Was this translation helpful? Give feedback.
All reactions