This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 7 years ago.
I'm trying to get the length of a multidimensional Array as follows, but when I test it with alert()
I get undefined. I would like to know how many items has the parent array (myArray), as I would like then to use it in a cycle i=0;i<myArray.length;i++
.
Any ideas?
myArray = array = {
'def':array = {
"first":"value",
},
0 : array = {
"T":"Some text",
},
1 : array = {
"T":"Some text",
},
};
leng = myArray.length;
alert(leng);