You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi!
I tried to use a multiple condition filter in a jsonPath
like: $[?(@.invoiceNum='${value1}' && @.issueNum=${value2})].issueDate
but the and operator doesn't work (i guess the or operator is the same).
I get a parse error:
Invalid JSONPath query '$[?(@.invoiceNum='1111111' && @.issueNum=1)].issueDate': Parse error at 1:28 near token & (&)
The text was updated successfully, but these errors were encountered:
I know this is 3years old but I couldn't reproduce your error with the following syntax and Goessner's data model.
Note that the keyword for AND is just one '&', not two
*** Test Cases ***
test and in jsonpath
${obj}= Load JSON From File ${CURDIR}/bookstore.json
${value}= Get Value From Json ${obj} $..book[?(@.category='fiction' & @.price>10)].title
log to console ${value}
Execution:
==============================================================================
Test
==============================================================================
test and in jsonpath ...
['Sword of Honour', 'The Lord of the Rings']
test and in jsonpath | PASS |
------------------------------------------------------------------------------
Test | PASS |
1 test, 1 passed, 0 failed
==============================================================================
Hi!
$[?(@.invoiceNum='$ {value1}' && @.issueNum=${value2})].issueDate
I tried to use a multiple condition filter in a jsonPath
like:
but the and operator doesn't work (i guess the or operator is the same).
I get a parse error:
Invalid JSONPath query '$[?(@.invoiceNum='1111111' && @.issueNum=1)].issueDate': Parse error at 1:28 near token & (&)
The text was updated successfully, but these errors were encountered: