I have JSON PHP Output below
{"data_0":{"data_1":{"A":0,"B":0},"data_2":{"C_C":"CC","D_D":"DD"}}}
In jQuery have code :
$.ajax({
url : 'process.php',
dateType: 'json',
type: 'POST',
data : {val : data_val},
success: function(data){
$(data.data_0.data_2).each(function(key, value) {
alert(key + " " + value);
});
But when run I received error : Uncaught TypeError: Cannot read property 'data_2' of undefined.
How to fix it ?
Thanks you so much.