-
Notifications
You must be signed in to change notification settings - Fork 535
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
Support jsonpath filter #440
Comments
Catch in the wild with the following <script>
var gnbNewModelJson = {"gnbLeftModelList:[{"displayName":"Offres","englishName":"offers","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFl... See as a JSON: {
"gnbLeftModelList": [
{
"displayName": "Offres",
"englishName": "offers",
"linkType": "move",
"displayFlag": "Y",
"mobileOnlyFlag": "N",
"menuPosition": "left",
"apiUseFlag": false,
}
]
} The JavaScript variable <script type="text/javascript">
window.tesla = {"App":{"app":"inventory-search-app","base_url":"https://www.tesla.com","host":"http://inventory-burst-app.tesla.com","language_direction":"LTR","locale":"en_US","strings":{"Chat":{"common":{"chatPreview":{"action__startChat":"Start Chat","content__haveQuestion":"Question about ordering a Tesla product?","content__supportLinkText":"If you are an existing customer, <a target=\"_blank\" href=\"/support/contact\">click here</a> for support.","label__close":"Close"}}}}},"debug":0,"filters":"{\"results\":{\"georegions\":{\"code\":\"georegions\",\"name\":\"Location\",\"type\":\"input\",\"accept\":\"string\",\"value\":\"\",\"availability\":[\"ms_used\",\"mx_used\",\"m3_used\",\"my_used\",\"ms_new\",\"mx_new\",\"m3_new\",\"my_new\"],\"custom\":true,\"choices\":[]},\"range\":{\"code\":\"range\",\"name\":\"Search within\",\"type\":\"dropdown\",\"ui_behavior\":{\"ignore_availability\":true},\"choices\":[{\"code\":25,\"name\":\"25 miles\",\"availability\":[]},{\"code\":50,\"name\":\"50 miles\",\"availability\":[]},{\"code\":100,\"name\":\"100 miles\",\"availability\":[]},{\"code\":200,\"name\":\"200 miles\",\"availability\":[]}],\"availability\":[\"
... As a JSON: {
"App": {
"app": "inventory-search-app",
"base_url": "https://www.tesla.com",
"host": "http://inventory-burst-app.tesla.com",
"language_direction": "LTR",
"locale": "en_US",
} |
Instead of a subquery, we have now filters. @fabricereix We could implement this as a "jsonpath" filter, similar to xpath filter. I've renamed the issue |
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Given the following html:
I would like to be able to analyse the js s variable.
We could add a jsonpath subquery, that could work like this:
Or with an intermediate capture:
The text was updated successfully, but these errors were encountered: