i have a ajax call that retreives data and its success portion looks like this:
success: function(data)
{
$("table.table").append("<tr><td>" + data.member_id + "</td><td>" + data.comment + "</td></tr>");
}
the data variable is holding this data
[{"member_id":"2","comment":"kkk"},{"member_id":"1","comment":"this is admin 2"},{"member_id":"2","comment":"kkk"},{"member_id":"1","comment":"this is admin"}]
but the problem im getting is that the table td's contain undefined text. how do i fix this?
the hardcoded table looks like this:
<table class="table"></table>