Open janwytze opened 1 year ago
Hi @janwytze, Indeed this is currently not supported in Hurl. We are not sure about this extension not present in the "official" spec https://goessner.net/articles/JsonPath/.
We might add a filter instead, that should be more readable and reusable. with your example
jsonpath "$.attachments" keys nth 0 == "key1"
jsonpath "$.attachments" keys nth 1 == "key2"
jsonpath "$.attachments" keys nth 2 == "key3"
Thanks for the response! I can right now solve it by using a count instead
What is the current bug behavior?
I cannot use JSONPath to receive object keys.
Steps to reproduce
This is the object I try to get keys from:
The following JSONPath queries do not work:
$.attachments.keys()
$.attachments.*~
$.attachments.*.@
What is the expected correct behavior?
I would expect one of the above to work. The result should be the following:
Execution context
hurl --version
):