Lets say I have an array which has n dimensions. Now in order to access a slot you typically use:
array [1][0]
What if the number of dimensions are not known at compile-time, is there an easy access like:
slot = "1,0"
array [slot] // accessing 1,0
Which means I can also easily navigate back and forth
slot += ",2"
array [slot] // accessing 1,0,2
Any such way to access any slot in a multidim array in one line of code, in ActionScript? I'm not looking for alternative code, that does it indirectly, (recursive functions or loops).
In JavaScript you could:
slot = "1,0"
eval("array[" + slot + "]") // accessing 1,0