I have a php page from which I get response in json:
[{\'com\':\'something\'},{\'com\':\'some other thing\'}]
I want to loop it and append
Try this:
var data = jQuery.parseJSON(response); $.each(data, function(key, item) { console.log(item.com); });
or
var data = $.parseJSON(response); $(data).each(function(i,val) { $.each(val,function(key,val) { console.log(key + " : " + val); }); });