Thank you. After playing around with eval I managed to do it using eval(splitstring[1].valueOf())[0] where splitstring[1] contained the name of the array I was trying to get to.
Thanks.
I have a script which grabs window.location, splits it and then puts part of it into a string. The script also defines a number of arrays.
I want to use the string to pull elements out of the associated array (assuming it exists). For example, if the string value is "X" I want to pull elements...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.