I have an object and need to set groups of values based on the condition. My loop looks like

xfa.resolveNode("form1.#pageSet.Page1.Subform1."+system+".Row["+s+"].Cell[0]").rawValue = product.system[s][0];
xfa.resolveNode("form1.#pageSet.Page1.Subform1."+system+".Row["+s+"].Cell[1]").rawValue = product.system[s][1];
xfa.resolveNode("form1.#pageSet.Page1.Subform1."+system+".Row["+s+"].Cell[3]").rawValue = product.system[s][2];


So after I hit the end of product.system.length, I want to sub in another word for "system" and go through the loop again until I've hit the end of that group.

Product is an object and it has properties product.system, product.reagents, product.controls, and product.accessories.

I can do this if I make 4 separate for loops, but surely there is a cleaner way?