1 var json= { "Type": "Coding", "Height":100 }; 2 3 for (var key in json) 4 { 5 alert(key); alert(json[key]); 6 } 7 8 $.each(json, function(i) { 9 alert(json[i]); 10 alert(i); 11 });
1 var json= { "Type": "Coding", "Height":100 }; 2 3 for (var key in json) 4 { 5 alert(key); alert(json[key]); 6 } 7 8 $.each(json, function(i) { 9 alert(json[i]); 10 alert(i); 11 });