How to iterate json data in jquery

You can use $.each() like this:

$.each(data, function(i, obj) {
  //use obj.id and obj.name here, for example:
  alert(obj.name);
});

Leave a Comment