Convert string to array

This piece of code gives the two echoes “Variable1” and “Variable2”. But instead of entering 1,2 manually into the exectuteScript_Sandbox command, I want it to come from a CSV file (with a variable number of elements in the array, so I don’t think I can use csvReadArray). I have tried just inserting a stored variable in place of [1,2], but then forEach doesn’t recognize it as an array. Any good ideas?

“Commands”: [
{
“Command”: “executeScript_Sandbox”,
“Target”: “return [1,2];”,
“Value”: “ArrayVars”,
“Description”: “”
},
{
“Command”: “forEach”,
“Target”: “ArrayVars”,
“Value”: “Variable”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Variable${Variable}”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}

you mean the CSV has a variable number of elements per row?

Yes. The CSV would look something like this:

Data1A,Data1B,“1,2”
Data2A,Data2B,“3”
Data3A,Data3B,“5,7,8,11”

I am happy to announce that I found a solution.

executeScript_Sandbox needs this target instead:

“Target”: “return ${!COL3}.split(”,")