Using or
in a select
#804
-
I have a multi-document YAML file and I'm trying to filter it down to a smaller set of documents based on a boolean expression that uses Versionyq version: 4.7.1 InputFile ---
a: hello
---
b: world
yq e 'select(.a == "hello" or .b == "world")' test.yaml Expected Outputa: hello
---
b: world Actual OutputNothing is printed BackgroundI tried removing the select to see if I somehow messed up my boolean expression: yq e '.a == "hello" or .b == "world"' test.yaml And the output here is what I would have expected: true
---
true Am I doing something wrong or have I discovered a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
quick look at this and it looks like it's a bug. Can't work out what's going on - need to investigate further. As a work around this works:
|
Beta Was this translation helpful? Give feedback.
quick look at this and it looks like it's a bug. Can't work out what's going on - need to investigate further.
As a work around this works: