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
Describe the bug
yq outputs duplicate keys when there are duplicate keys in the input.
yq
Version of yq: 4.44.6 Operating system: mac Installed via: binary release
Input Yaml
data1.yml:
{"foo":1,"foo":2}
Command
yq . data.yaml
Actual behavior
{"foo": 1, "foo": 2}
Expected behavior
{"foo": 2}
Additional context
yq outputs duplicate keys when there are duplicate keys in the input:
$ echo '{"foo":1,"foo":2}' | ./yq_darwin_arm64 {"foo": 1, "foo": 2} $ echo '{"foo":1,"foo":2}' | ./yq_darwin_arm64 -P "foo": 1 foo: 2 $ ./yq_darwin_arm64 --version yq (https://github.com/mikefarah/yq/) version v4.44.6
jq removes duplicates, keeping the last value:
jq
$ echo '{"foo":1,"foo":2}' | jq { "foo": 2 }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
yq
outputs duplicate keys when there are duplicate keys in the input.Version of yq: 4.44.6
Operating system: mac
Installed via: binary release
Input Yaml
data1.yml:
{"foo":1,"foo":2}
Command
Actual behavior
{"foo": 1, "foo": 2}
Expected behavior
{"foo": 2}
Additional context
yq
outputs duplicate keys when there are duplicate keys in the input:jq
removes duplicates, keeping the last value:The text was updated successfully, but these errors were encountered: