I have a requirement where in I have to populate these variables using for loop in JavaScript digitalData.option1.name1 digitalData.option2.name2 so on..... I tried below code
var i=1;
for(some conditions){
digitalData.this["option"+i].this["option"+i] = value;
i++;
}
But it is showing syntax error and I also tried this Window["digitalData.option+i+.name+i"] But digitaData is not getting populated