Hi,
I wsa trying to get a particular array value from the flow context, but i could only get the whole values in the array instead of a particular value.
I was using
msg.payload = flow.get("testCheck",[0]);
to get the value but no hope.
Any help is appreciated. Thanks in advance
flow.get accepts a single argument, the variable.
The variable contains an array and you want the first element:
const myFlowVariable = flow.get("testCheck")
msg.payload = myFlowVariable[0]
// or if you want the short version:
msg.payload = flow.get("testCheck")[0]