This is response from my php script:
[{"name":"sss","vote_up":2,"vote_down":0,"report":2},{"name":"sdsad","vote_up":2,"vote_down":0,"report":2},{"name":"sssssss","vote_up":2,"vote_down":0,"report":2},{"name":"sssssss","vote_up":2,"vote_down":0,"report":0},{"name":"sss","vote_up":1,"vote_down":0,"report":1},{"name":"TEST","vote_up":1,"vote_down":0,"report":1},{"name":"asdsa","vote_up":1,"vote_down":0,"report":0},{"name":"ssssssssss","vote_up":1,"vote_down":0,"report":0},{"name":"TEEST","vote_up":1,"vote_down":0,"report":0},{"name":"sssssssssssssssssssss","vote_up":1,"vote_down":1,"report":1},{"name":"asdsadsa","vote_up":1,"vote_down":0,"report":1},{"name":"KOmentar","vote_up":1,"vote_down":0,"report":1},{"name":"ssssssssss","vote_up":0,"vote_down":1,"report":1}]
how can I catch that data with jQuery, here is my try but not working:
$.ajax({
method:"POST",
url:"/bylikes",
data:{task:true,comment:commentID,reply:replyID},
success: function( data ){
repObj = JSON.parse(data);
$.each(repObj,function(index,item){
alert(item.name+ " - "+item.report)
});
//$('#fullList').html(""+data+"");
}
});