We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
loc.indexOf is not a function
I get this error with a specific expression: loc.indexOf is not a function
Given this json payload:
{ "stores": [ { "name": "Store 1"}, { "name": "Store 2" }, { "name": "Store 3" }, { "name": "Store 4"} ] }
When I apply this path $.stores[1:4:2][(@.length-1)].name Then I get an error: loc.indexOf is not a function.
$.stores[1:4:2][(@.length-1)].name
Please note that this expression ($.stores[1:4:2]) returns:
$.stores[1:4:2]
[ { "name": "Store 2" }, { "name": "Store 4" } ]
And this expression ($.stores[(@.length-1)].name) returns:
$.stores[(@.length-1)].name
[ "Store 4" ]
There should be no error.
"Store 4"
Describe the bug
I get this error with a specific expression:
loc.indexOf is not a functionCode sample or steps to reproduce
Given this json payload:
{ "stores": [ { "name": "Store 1"}, { "name": "Store 2" }, { "name": "Store 3" }, { "name": "Store 4"} ] }When I apply this path
$.stores[1:4:2][(@.length-1)].nameThen I get an error:
loc.indexOf is not a function.Please note that this expression (
$.stores[1:4:2]) returns:[ { "name": "Store 2" }, { "name": "Store 4" } ]And this expression (
$.stores[(@.length-1)].name) returns:[ "Store 4" ]Expected behavior
There should be no error.
Expected result
"Store 4"Environment (IMPORTANT)
Desktop**