Describe the bug
Following the documentation |= empty is supposed to delete the element.
But when multiple elements are set to empty it does not work properly.
To Reproduce
query: (.[] | select(. >= 2)) |= empty
input: [1,5,3,0,7]
output: [1,3,7]
Expected behavior
output: [1,0]
Environment:
jqplay
Note
- If you replace
>=2 with >=7 then 7 is deleted.
- If you replace
>=2 with >=5 then only 5 is deleted.