I need help with nested functions

I’m new to this software, and would really appreciate your help understanding loop and times functions. I currently have a csv file which insists of item numbers and quantities to be ordered for each item. I’m using the times function since this is a nested loop. However, when I run the macro it always puts the first value on x(0,0) instead of x(1,0). I have created a previous macro without nested loops and every time the whole loop runs, it goes to the next value on the CSV file automatically.

{
“Command”: “times”,
“Target”: “13”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “csvRead”,
“Target”: “items.csv”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “csvReadArray”,
“Target”: “items.csv”,
“Value”: “itemsCSV”,
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “__starc-14 = ${!COL1}”,
“Value”: “blue”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=__starc-14”,
“Value”: “”,
“Targets”: [
“id=__starc-14”,
“name=searchText”,
“xpath=//[@id="__starc-14"]",
“xpath=//input[@id=‘__starc-14’]”,
“xpath=//div/input”,
“css=#__starc-14”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=__starc-14”,
“Value”: “${!COL1}”,
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “css=#header-nav > div > header > div:nth-child(4) > div:nth-child(2) > div > div > div > div > form > div > div.SearchBar_module_fieldRoot__f206a894 > button > span > svg > path”,
“Value”: “”,
“Targets”: [
"xpath=//
[@id="header-nav"]/div/header/div[4]/div[2]/div/div/div/div/form/div/div/button/span/svg/path”,
“css=#header-nav > div > header > div:nth-child(4) > div:nth-child(2) > div > div > div > div > form > div > div.SearchBar_module_fieldRoot__f206a894 > button > span > svg > path”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “name=//pro/formhandler/PartCategoryFormHandler.checkedInfo”,
“Value”: “14200001!partsAndOEM!cat11260455!Replacement Parts”,
“Targets”: [
“name=//pro/formhandler/PartCategoryFormHandler.checkedInfo”,
“xpath=//[@id="wfey6a-accordion"]/div/div/label/input",
“xpath=//input[@name=‘/pro/formhandler/PartCategoryFormHandler.checkedInfo’]”,
“xpath=//li/div/div/div/label/input”,
“css=#wfey6a-accordion > div > div > label > input.search-results-checkbox”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “name=//pro/formhandler/PartCategoryFormHandler.checkedInfo”,
“Value”: “”,
“Targets”: [
“name=//pro/formhandler/PartCategoryFormHandler.checkedInfo”,
"xpath=//
[@id="wfey6a-accordion"]/div/div/label/input”,
“xpath=//input[@name=‘/pro/formhandler/PartCategoryFormHandler.checkedInfo’]”,
“xpath=//li/div/div/div/label/input”,
“css=#wfey6a-accordion > div > div > label > input.search-results-checkbox”
],
“Description”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “id=search-results-selection-form-submit”,
“Value”: “”,
“Targets”: [
“id=search-results-selection-form-submit”,
“name=//pro/formhandler/PartCategoryFormHandler.lookup”,
“xpath=//[@id="search-results-selection-form-submit"]",
“xpath=//input[@id=‘search-results-selection-form-submit’]”,
“xpath=//section[2]/div/form/div/input”,
“css=#search-results-selection-form-submit”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “name=quantity”,
“Value”: “”,
“Targets”: [
“name=quantity”,
"xpath=//
[@id="row-sku11641813"]/td[3]/div[2]/div[2]/input”,
“xpath=//input[@name=‘quantity’]”,
“xpath=//div[2]/input”,
“css=#row-sku11641813 > td.quantity-col > div.row.small-collapse > div.small-8.columns > input.input-qoh”
],
“Description”: “”
},
{
“Command”: “echo”,
“Target”: “Quantity = ${!COL2}”,
“Value”: “blue”,
“Description”: “”
},
{
“Command”: “type”,
“Target”: “name=quantity”,
“Value”: “${!COL2}”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id="row-sku11641813"]/td[3]/button",
“Value”: “”,
“Targets”: [
"xpath=//
[@id="row-sku11641813"]/td[3]/button”,
“xpath=//td[3]/button”,
“css=#row-sku11641813 > td.quantity-col > button”
],
“Description”: “”
},
{
“Command”: “end”,
“Target”: “”,
“Value”: “”,
“Description”: “”
},