Open
Description
What is the current bug behavior?
I can not use multiple filter expressions in JSONPath
Steps to reproduce
This is the response:
{
"store": {
"books": [
{
"name": "book1",
"category": "fiction",
"price": 10
},
{
"name": "book2",
"category": "history",
"price": 20
},
{
"name": "book3",
"category": "fiction",
"price": 5
},
{
"name": "book4",
"category": "fiction",
"price": 15
}
]
}
}
And the following JSONPath queries do not work:
[Captures]
books: jsonpath "$.store.books[?(@.category == 'fiction' && @.price >= 10)].name"
It throws an error saying that:
error: Invalid JSONPath
books: jsonpath "$.store.books[?(@.category == 'fiction' && @.price >= 10)].name"
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the JSONPath expression '$.store.books[?(@.category == 'fiction' && @.price >= 10)].name' is not valid
What is the expected correct behavior?
I expect the result should be the following:
[
"book1",
"book4"
]
However, it appears to function properly only with one expression, as shown below:
[Captures]
books: jsonpath "$.store.books[?(@.category == 'fiction')].name"
Execution context
- Hurl Version (
hurl --version
):
hurl 3.0.1 libcurl/7.79.1 (SecureTransport) LibreSSL/3.3.6 zlib/1.2.11 nghttp2/1.45.1
Features (libcurl): alt-svc AsynchDNS HSTS HTTP2 IPv6 Largefile libz NTLM NTLM_WB SPNEGO SSL UnixSockets
Features (built-in): brotli
- Operating system and version: macOS