Question
how to use incremental variable in addressing nested objects
I have a for statement intended to load images from an
external array and insert them into the content holders.
for (i=0; i<15; i++){
products.prod+i.circle.pic.contentPath = imagearray ;
};
If I replace the +i with a number between 0-14, it works fine. What is the proper trick to append the i variable after 'prod'?
I have tried many things with no luck.
Thank you.
for (i=0; i<15; i++){
products.prod+i.circle.pic.contentPath = imagearray ;
};
If I replace the +i with a number between 0-14, it works fine. What is the proper trick to append the i variable after 'prod'?
I have tried many things with no luck.
Thank you.