i have something like this:
$("#btn").click(function (event) {
$.getJSON(url,
function (data) {
// i using this which works fine...
//alert(data[0].Id);
//alert(data[0].Name);
//alert(data[0].Tion);
//alert(data[0].Path);
//alert(data[0].Flag);
//how do i loop here
$(data).each(function() {
alert(data);
});
});
});
Like this:
Or, a more terse version, in which
thisis automatically assigned to each element indatafor you: