Extract array from Global context

I have a problem extracting an array from a Global variable that is an array of arrays.
I want to use a calculated index instead of a fixed index. this is in a JsoNATA expression in a change node:

$globalContext("rfcodes")[0] works
$globalContext("rfcodes")[payload-1] does not

rfcodes looks like this:

array[2]
0: array[4]
0: 9710
1: 250
2: 870
3: "#454551"
1: array[4]
0: 9710
1: 250
2: 870
3: "#454554"

The answer was worth two Dollars :slight_smile:
$globalContext("rfcodes")[$$.payload-1]

Wait!! Who got the two dollars? :rofl:

1 Like

From left pocket to right :smile:

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.