In very old versions of Groovy, I believe there was a mechanism that
tried to be smart for some GPath expressions, working out when the
list size was 1 and in that case returning the value instead of the
list. This turned out to be a bad idea that was trying to be "too
smart", prohibiting certain k
On 5/14/25 11:55, Jeemol K S via dev wrote:
[...]
In *Groovy 2.x*, it was possible to reference elements directly without
specifying the index, such as:
|response.itemResult.itemResultItems.salePrice |
However, in *Groovy 3.x*, the same reference now requires explicit indexing:
|response.
When using syntax like "response.itemResult.itemResultItems.salePrice" where
"itemResultItems" produces a list, then you can get the "salePrice" property.
It should produce a list. It should be synonymous with
"response.itemResult.itemResultItems*.salePrice"
If you want just one sale price, t