JoostDG
7 years agoFrequent Contributor
<BUG?> SOAPui 2.3.0 (@.length-1) JSON Path notation
Hi, I want to assert a content to another content from a previous rest request. Specific example: sorting. I want to make sure that my last result in the list becomes the first when I revert the ...
- 7 years ago
I got feedback from Smartbear support on this (thanks Marcus!) and think this might be usefull sharing:
Development has confirmed this is a bug with the json-path-2.4.0.jar we are using for JsonPath. There are a number of issues related to @.length, see below links. As a workaround you can use the workaround you posted in the forum or negative array indexes as suggested by Ready API development.
example: $['Lijst'][-1]['Naam']
https://github.com/json-path/JsonPath/issues/300
https://github.com/json-path/JsonPath/issues/338
https://github.com/json-path/JsonPath/issues/450
So for me changing (@.length-1) with -1 works!