I have a multidimensional array in javascript, jsfiddel please check the below code. Some thing like this working in php but not in javascript, is this possible in javascript.
<script>
var mydata = {'test' : 'testing'};
var mydata2 = {'test2' : mydata};
var myvar = 'test2';
// This one is working
alert(mydata2.test2.test);
// but this is not working
alert(mydata2.myvar.test);
</script>