Edit : thanks, I misused the eval function, now this works fine that way :
eval('foo'+bar), instated of foo[eval(bar)] or eval(foo[bar]). This was very simple finally...

---

For some reasons, I have to convert a string to a valid index to access elements in a complex multidimensionnal array. For example, let's say I have this :

```
var foo = [
    [1,2,3],
    [
        4,
        [5,6]
    ]
];

var bar  =  [
    1: "[0][0]", 
    2: "[0][1]", 
    3: "[0][2]", 
    4: "[1][0]", 
    5: "[1][1][0]", 
    6: "[1][1][1]"
];

var selectVal5 = foo[bar[5]];

```

I tried few `eval()` tricks, but it doesn't seem to work. So, any idea to solve this ?