Uncaught TypeError: Cannot use 'in' operator to search for 'length' in {...} $.each
xhr = getXMLHttp();
var sendDT = new FormData();
sendDT.append('page', 'home');
xhr.open('POST', HTTP, true);
xhr.send(sendDT);
xhr.onreadystatechange = function(){
if (xhr.readyState == 4){
console.log('[server:' + xhr.status + ']');// + JSON.parse(xhr.response));
data = JSON.parse(xhr.responseText);
$.each(data, function(index, value) {
console.log(index);
console.log(value);
});
}
}
e.preventDefault();