I have extract Json element in previous step (which created an array) and I want to access specific element inside using counter variable (inside foreach). this is the element that holds the array:
SB_names
and inside the 'Foreach' I have created a counter with variable - 'counter'. now, in the name of the http request I'm trying to access each element of the array in each iteration. this works for example:
${__V(${SB_names_1})}
but I want to do something like this (which currently is not working):
${__V(${SB_names_${counter}})}
thanks.
The correct syntax would be:
${__V(SB_names_${counter})}
For example, if one has variables A1,A2 and N=1:
${A1} - works OK
${A${N}} - does not work (nested variable reference)
${__V(A${N})} - works OK. A${N} becomes A1, and the __V function returns the value of A1
References:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With