Re: Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-06-05 Thread Paul King
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

Re: Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-06-02 Thread Jochen Theodorou
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.

Re: Clarification on Explicit Indexing Requirement in Groovy 3.x

2025-05-16 Thread Milles, Eric (TR Technology) via dev
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