I have json as shown below
{
"aaData": [
[
{
"displayValue": "Home Page",
"link": "http://somelink.com"
},
"London",
"1983"
],
[
{
"displayValue": "Backlog",
"link": "http://BacklogApp.com"
},
"Paris",
"1999"
]
]
}
Now in js, i am populating table using sAjaxSource. But I want first column to be a link. I am using fnRowCallback attribute to get data. Here I am checking if first element of the row is not a string (means is an array), then make first element as a link as I have done below
"fnRowCallback": function( nRow, aData, iDisplayIndex, iDisplayIndexFull ) {
if(typeof aData[0] != 'string'){
$('td:eq(0)', nRow).html( '<a href="' + aData[0][1] +'" >' +
aData[0][0] + '</a>');
}
}
But problem is I am not able to get aData[0][0] or aData[0][1] value as it shows undefined.
Does anyone know how can i get "displayValue" and "link" values here????