This content has been marked as final. Show 4 replies
Use "bracket notation":
[ "flatObj.valueA_" + count ] = myArray[count].valueA;
Incidentally, in this case you don't need the "count" variable. You can just use the "x" variable.
[ "flatObj.valueA_" + x] = myArray[x].valueA;
Can we declare components dynamically using the bracket notation?
for (i=0; i<10; i++)
var ["lbl"+i]: Label= new Label;
Didn't work for me... is there a way that can be done?