Hi I am new to php and ajax I wrote an select query in php and pushed the results into an array and I am trying to display the results in the table format using ajax for that I had wrote an ajax call as follows
$.ajax({
type:"POST",
url:"propage.php",
dataType:"json",
data:{
action:"addFilter",
pid:pid,
},
success : function(filres)
{
if(filres.status==1)
{
{ $.each(filres.data, function(i, row) {
var row = "<tr>";
row += "<td>" + row.filter_id + "</td>";
row += "<td>" + row.name + "</td>";
row += "<td>" + row.filter + "</td>";
row +="<td>"<a href=>Delete</a>"</td>";
row += "</tr>";
$("#table_filter").append(row);
});
}
}
else
{
$("#get_msg").html("<p style=\'color:red;font-weight:bolder;\'>"+filres.data+"</p>");
}
}
});
return false;
});
But in the table I am getting data as undefined but when I click on the button I am getting the data in the network tab as follows
data: [{filter_id: "1", name: "ss", filter: "SOCIAL SECURITY"},…]
Can anyone help me out for this?