Javascript: Make Object.byString dynamic [duplicate]

  javascript, object

I have the following line of code:

for (var t = 0; t < timingobj['Test'].length; t++) {
var test1= "Test[0].NextTest.EstimatedTestScore";

var time= Object.byString(timingobj, test1);
}

How do I replace the "0" to be dynamic with "t", using the for loop?
var test1= "Test[t].NextTest.EstimatedTestScore";

Source: Ask Javascript Questions

LEAVE A COMMENT