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
startswith, endswith throwing "invalid input text" error when trying to use with select #2026
Comments
Thanks for raising; note that my yq is not a wrapper around jq; but rather tries to re-implement it in go (so you don't need jq or python to run it). The reason you're getting that error is because I haven't yet added that operator in :) You can still get what you want by either using the match operator:
Or wildcards:
|
Also, happy to take PRs for adding startswith / endswith :) |
Ah, I guess I'd put something in the lexer/parser or whatever that if it sees something that looks like a function, but isn't recognized, an error that it's an unknown function or not defined rather than "invalid input text" $ echo {} | jq ".thing | select(.whatever)" # runs fine (no output)
$ echo {} | jq ".thing | asdf(.whatever)"
jq: error: asdf/1 is not defined at <top-level>, line 1:
.thing | asdf(.whatever)
jq: 1 compile error |
Describe the bug
startswith
and related functions don't work as injq
Version of yq: 4.43.1
Operating system: macOS 14.4.1
Installed via: Homebrew
Script
Output
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: