Describe the bug
When provided with an array of objects, unique does not perform a 'deep' comparison to determine equality (like jq does).
Version of yq: 4.44.1
Operating system: linux
Installed via: binary release
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:
- a: 1
b: 2
- a: 2
b: 2
- a: 1
b: 2
- a: 1
b: 1
Command
The command you ran:
Actual behavior
Expected behavior
- a: 1
b: 2
- a: 2
b: 2
- a: 1
b: 1
Additional comment
Using a roundtrip via jq provides the right output (though the order in the output was sorted):
cat data1.yml | yq -j - | jq 'unique' - | yq -P -
result:
- a: 1
b: 1
- a: 1
b: 2
- a: 2
b: 2
Describe the bug
When provided with an array of objects, unique does not perform a 'deep' comparison to determine equality (like jq does).
Version of yq: 4.44.1
Operating system: linux
Installed via: binary release
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:
Command
The command you ran:
Actual behavior
Expected behavior
Additional comment
Using a roundtrip via jq provides the right output (though the order in the output was sorted):
result: