if you have something like this
var x='y';
var z='x';
if we want to get value of x (i.e y )from z we can achieve like this
eval(z) which will give you 'y'.
My question is if i am having x as an array like
var x=[a,b,c];
var z='x';
how can i get the x array values like x[0],x[1],x[2] using variable z.
we can't use like eval(z[0]),if we gave like eval[z] we will get like [a,b,c] but i want to access individual array elements directly.what is the way to achieve this.
Please help.
Thanks in Advance.