What is the scope of a variable? #1567
Answered
by
mikefarah
pmahony893
asked this question in
Q&A
-
I ran the following: echo "[1, 2, 3]" | yq '[.[] | . as $v | select($v == 1)]' Naively, I expected the result to be:
However, the result was:
I get the same result if I specify I feel I must be misunderstanding something about how variables work in yq pipelines! Can anyone help? |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Feb 22, 2023
Replies: 1 comment 1 reply
-
Hmm I think this is a bug, related to #1566 - I'm looking into it |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
pmahony893
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hmm I think this is a bug, related to #1566 - I'm looking into it