I have following code,
$.ajax({
type: "POST",
async: false,
//dataType: "json",
url: 'index.php',
data : { lat : latValue, lng : lngValue },
success: function (data){
console.log(data);
data = JSON.parse(data);
console.log(Object.keys(data).length);
for(var k = 0; k <Object.keys(data).length; k++) {
// zipcode_final[i][k] = ;
break;
}
}
});
// csvRows.push(zipcode_final);
}
});
See this edited code. How to get number of items ( length ) of data json object? This returns only number of characters. My Josn array looks like below,
[["44641","44730","44669"]]