Skip to content
New issue

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

Extend path syntax #145

Merged
merged 2 commits into from
Jan 9, 2024
Merged

Extend path syntax #145

merged 2 commits into from
Jan 9, 2024

Conversation

01mf02
Copy link
Owner

@01mf02 01mf02 commented Jan 9, 2024

This PR extends the syntax in jaq to also allow for .a.[] forms.

In jq 1.7, a query .a.[] is valid syntax, whereas in jq 1.6, this is invalid syntax. (However, .a[] is valid in both.)
This was encountered in #134. @kklingenberg attempted a fix in #138; however, I took the opportunity to make my own PR and completely redo the path parsing, as it got rather messy. I just borrowed the tests from @kklingenberg's PR.

@01mf02 01mf02 merged commit 2769ce6 into main Jan 9, 2024
@01mf02 01mf02 deleted the extend-path-syntax branch January 9, 2024 13:01
@01mf02 01mf02 linked an issue Jan 9, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected token [ in '.nodes.[]'
1 participant