-
Hi. I have yaml config with servers. And I need find servers with specific tag. I use contains for that, but I have some unexpected result: servers:
- name: server-1
tags:
- foo
- name: server-2
tags:
- bar
- name: server-3
tags:
- foo
- bar I run command for tag "foo" and receive correct values, which I expected: # yq e '.servers[] | select(.tags[] | contains("foo")) | .name' test.yaml
server-1
server-3 But it didn't work for tag bar: # yq e '.servers[] | select(.tags[] | contains("bar")) | .name' test.yaml
server-2 Could you please explain how it's work and how I can change my query for take expected result? |
Beta Was this translation helpful? Give feedback.
Answered by
mikefarah
Oct 7, 2021
Replies: 1 comment 2 replies
-
Actually what you have should work - you found a bug! I've raised one on your behalf: #958 and will have a fix shortly in the next release. |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
mexoboy
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Actually what you have should work - you found a bug!
I've raised one on your behalf: #958 and will have a fix shortly in the next release.