-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[feature] JSONPath not supporting multiple conditions? #1116
Comments
Ah ok, so current version, I remember we added a fix a while back because someone else reported something similar |
Can you try JQ instead? That should work better |
JQ is quite a bit more complicated i must say. I have modified my filter and it works good enough for me now. But i think i will need this feature in the future so my question is still relevant (if possible to add the feature ofcourse...). |
yeah hmm, I think it's a discrepency in the library that this project uses to process the jsonpath versus other sites, you know I'm just one guy and didn't write this application and all of the jsonpath handling parser too :-D |
|
I managed to rewrite my query into JQ. This is wat i came up with. It retrieves the firmwares for the EdgeRouter X SFP that are published later than 2022-07:
The expression My question is solved for now. Feel free to close the issue. |
Version and OS
v0.39.21.1 on Docker (Linux)
Is your feature request related to a problem? Please describe.
I think this is a bit similar to #623 but then for JSONPath instead of CSS.
I made a filter that works perfectly when testing with https://jsonpath.com/ but changedetection.io filter page is not accepting it 😞 I think it is due to the '&&' operator.
Describe the solution you'd like
Could the feature to use multiple filters (by using '&&' operator) in a JSONPath expression be added?
Describe the use-case and give concrete real-world examples
The filter i made:
$.downloads[?(@.category__slug=='firmware' && !@.name.includes('v1.') && @.name.includes('ER-X-SFP'))].name
When i put this filter into the page, i get the error:
is not a valid JSONPath expression. (Parse error at 1:44 near token & (&))
The same happens with a more simple filter with two conditions, like this one:
$.downloads[?(@.category__slug=='firmware' && @.featured==true)].name
Results in
is not a valid JSONPath expression. (Parse error at 1:44 near token & (&))
You can try for yourself, this is the JSON source data: https://pastebin.com/raw/USJSdSWd
Additional context
The text was updated successfully, but these errors were encountered: