Possible Duplicate:
Length of Javascript Associative Array
I want to check the length of a multidimensional array but I get undefined as the return. I'm assuming that I am doing something wrong with my code but I can't see anything odd about it.
alert(patientsData.length); //undefined
alert(patientsData[XXXXX].length); //undefined
alert(patientsData[XXXXX]['firstName']); //a name
fruits = [Banana, Orange, Apple, Mango];
alert(fruits.length); //4
Thoughts? Could this have something to do with scope? The array is declared and set outside of the function. Could this have something to do with JSON? I created the array from an eval() statement. Why does the dummy array work just fine?