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

Document that gojq supports string indexing #160

Closed
wader opened this issue Feb 26, 2022 · 0 comments
Closed

Document that gojq supports string indexing #160

wader opened this issue Feb 26, 2022 · 0 comments

Comments

@wader
Copy link
Sponsor Contributor

wader commented Feb 26, 2022

Hi, i stumbled upon this today when i was fiddling around. Seems strange jq does not support it?

$ jq --version
jq-1.6-145-ga9f97e9
$ jq -n '"abc"[1]'
jq: error (at <unknown>): Cannot index string with number
$ gojq --version
gojq 0.12.6 (rev: HEAD/go1.17.3)
$ gojq -n '"abc"[1]'
"b"
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

No branches or pull requests

1 participant