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
Extending a slice by setting an element that is "hidden" by the slice reveals elements between the last one of the slice and the element being set:
: ; jq -cn '[range(10)][0:3]|(.,(.[5] = true))' [0,1,2] [0,1,2,3,4,true]
Appending to a slice works:
: ; jq -cn '[range(10)][0:3]|(.,(.+[true]))' [0,1,2] [0,1,2,true]
But then:
: ; jq -cn '[range(10)][1:3]|[.,(.[5] = true)]' [[1,2],[1,2,null,null,null,true]]
Using offsets other than zero in the slice does not make things worse, fortunately:
: ; jq -cn '[range(10)][1:3]|(.,(.[5] = true))' [1,2] [1,2,3,4,5,true] : ; jq -cn '[range(10)][1:3]|(.,(.+[true]))' [1,2] [1,2,true]
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Extending a slice by setting an element that is "hidden" by the slice reveals elements between the last one of the slice and the element being set:
Appending to a slice works:
But then:
Using offsets other than zero in the slice does not make things worse, fortunately:
The text was updated successfully, but these errors were encountered: