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
When comparing numeric values, I get an error:
(feature/1176)$ echo '[{"vote": 10, "Name": "First"},{"vote": 5, "Name": "Second"}]' | jp "[?vote!='10'].{Name: Name}" [ { "Name": "First" }, { "Name": "Second" } ] (feature/1176)$ echo '[{"vote": 10, "Name": "First"},{"vote": 5, "Name": "Second"}]' | jp "[?vote==10].{Name: Name}" SyntaxError: Invalid token: tNumber [?vote==10].{Name: Name}
Using v 0.1.3
The text was updated successfully, but these errors were encountered:
I think you're using a wrong syntax.
In the first line, when you write '10', you are talking about the string "10", not the number 10.
'10'
In the second line, when you write 10, without ` or ', this is a wrong syntax.
10
`
'
Try this:
$ echo '[{"vote": 10, "Name": "First"},{"vote": 5, "Name": "Second"}]' | jp '[?vote!=`10`].{Name: Name}' [ { "Name": "Second" } ] $ echo '[{"vote": 10, "Name": "First"},{"vote": 5, "Name": "Second"}]' | jp '[?vote==`10`].{Name: Name}' [ { "Name": "First" } ]
Sorry, something went wrong.
Double quotes with numeric values throws error. You need to wrap your query in single quotes and numeric value in back ticks.
No branches or pull requests
When comparing numeric values, I get an error:
Using v 0.1.3
The text was updated successfully, but these errors were encountered: