Solved!
For those who struggled with the same thing, just use csvReadArray to put on a variable then it would look like this: ${Variable}[col][row] so in order to add col everytime it doesn’t exist and add increment via execute script and make it trigger everytime when the value doesn’t exist
Sample Code:
{
“Name”: “v”,
“CreationDate”: “2021-8-17”,
“Commands”: [
{
“Command”: “csvReadArray”,
“Target”: “readcsvtestdata.csv”,
“Value”: “myCSV”,
“Description”: “”
},
{
“Command”: “store”,
“Target”: “0”,
“Value”: “Loop_Counter”,
“Description”: “”
},
{
“Command”: “label”,
“Target”: “Loop”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “if_v2”,
“Target”: “${myCSV[${Loop_Counter}][1]} == “Knuth””,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Knuth does exist”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “else”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Knuth doesn’t exist”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “executeScript_Sandbox”,
“Target”: “counter = ${Loop_Counter};\nvar add = ++counter\nreturn add;”,
“Value”: “Loop_Counter”,
“Description”: “Add one to column variable to check another column in next loop check”
},
{
“Command”: “gotoLabel”,
“Target”: “Loop”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
}
]
}