How do I populate Table with dynamic data?

How do I populate Table with dynamic data?

SxChocSxChoc Posts: 6Questions: 0Answers: 0
edited May 2013 in General
Hi Folks,
I'm trying to load a datatable with data that's being pulled from a webservice (asp.net). The webservice is returning a dataset which I'm calling from my page like so:

function loadTable()
{
$.ajax({
type: "POST",
url: "http://localhost:64102/wsJQueryDBCall.asmx/ReadDataTable",
data: "{}",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (json) {
alert(json.d);
$('#example').dataTable({
"bRetrieve": true,
"bProcessing": false,
"bServerSide": false,
"bPaginate": false,
"aaData": json.d
});
}
});
}

This code has been cobbled together from looking at all solutions on the forums but I just can't get it to work. Using the alert I can see that data is being successfully returned but how would I load this data into my table? Any help would be absolutely marvellous.

Thanks,
Craig
This discussion has been closed.