We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hello. not really sure this is a bug, not some dark yamel corners. so we have test.ymel like this:
test.ymel
a: b: - 0 - 1 - 2 - 3
then yq eval '.a.b.[] | path | .[-1]' test.yaml works as expected:
yq eval '.a.b.[] | path | .[-1]' test.yaml
0 1 2 3
let's add some nesting:
a: b: c: - 0 - 1 - 2 - 3
and eval '.a.b.c.[] | path | .[-1]' test.yaml give us:
eval '.a.b.c.[] | path | .[-1]' test.yaml
3 3 3 3
what is really weird: looks like it's OK when array is nested to 2^n levels
2^n
yq eval '.a.[] | path | .[-1]' test.yaml
yq eval '.a.b.c.d.[] | path | .[-1]' test.yaml
yq eval '.a.b.c.d.e.f.g.h.[] | path | .[-1]' test.yaml
yq eval '.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.[] | path | .[-1]' test.yaml
here I stop and open this issue
Version of yq: 4.1.0 Operating system: linux Installed via: binary release
p.s. would like to take this opportunity to warmly thank Mike for success years whith yq 🖖 p.p.s. I really love new eval syntax. wtg
yq
upd. seems like #589
The text was updated successfully, but these errors were encountered:
hi. me again. try to merge some old docker-composes. and yes, yq4 processed only last element from arrays. can't repeat with yq3
Sorry, something went wrong.
Think I've found the bug in the code - thanks for the clear ticket! Will fix in the next release.
No branches or pull requests
hello. not really sure this is a bug, not some dark yamel corners. so we have
test.ymel
like this:then
yq eval '.a.b.[] | path | .[-1]' test.yaml
works as expected:let's add some nesting:
and
eval '.a.b.c.[] | path | .[-1]' test.yaml
give us:what is really weird: looks like it's OK when array is nested to
2^n
levelsyq eval '.a.[] | path | .[-1]' test.yaml
- 2^0, OKyq eval '.a.b.[] | path | .[-1]' test.yaml
- 2^1, OKyq eval '.a.b.c.d.[] | path | .[-1]' test.yaml
- 2^2, OKyq eval '.a.b.c.d.e.f.g.h.[] | path | .[-1]' test.yaml
- 2^3, ОКyq eval '.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.[] | path | .[-1]' test.yaml
- 2^4, OKhere I stop and open this issue
Version of yq: 4.1.0
Operating system: linux
Installed via: binary release
p.s. would like to take this opportunity to warmly thank Mike for success years whith
yq
🖖p.p.s. I really love new eval syntax. wtg
upd. seems like #589
The text was updated successfully, but these errors were encountered: