After receiving JSON data from the server via AJAX, I proceeded to evaluate it as follows:
request.responseText=[{name:xxx},{name:yyy},{name:zzz}].
I then used the following code snippet:
var data=eval(request.responseText);
alert(data.length);
Surprisingly, in Internet Explorer the length returned was "4", while in Firefox it was "3".
Upon further investigation using the IE debugger, I discovered that the elements in the 'data' object appeared as follows:
[Methods]
[0]
[1]
[2]
This structure resulted in a length of 4. Curious as to why this discrepancy occurred?