i need to access a json file dynamically and am using the following code. In this case, 'bpicsel' and 'temp' are variables. The end result would be something like 'data[0].extit1'
var title="data["+bpicsel+"].extit"+temp;
$.getJSON('labs.json', function(data){
title2 = eval(title);
});
this works - but i am often told not to use eval - is there a better way?