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
I don't know what this should output, but 2 isn't it.
2
$ jq -nc '{"a":[1,2,3]} | .a[] |= empty' {"a":[2]}
This is the result of the following property of |=:
|=
If the right-hand side outputs no values (i.e., empty), then the left-hand side path will be deleted, as with del(path).
empty
del(path)
This property also introduces this annoying difference:
$ jq -nc '{"a":[1,2,3]} | .a = ( .a | empty )' $ jq -nc '{"a":[1,2,3]} | .a |= empty' {}
The text was updated successfully, but these errors were encountered:
duplicate of #2051.
Sorry, something went wrong.
Indeed, so I'll close.
Successfully merging a pull request may close this issue.
I don't know what this should output, but
2
isn't it.This is the result of the following property of
|=
:This property also introduces this annoying difference:
The text was updated successfully, but these errors were encountered: