Datasource is empty?

Datasource is empty?

andrifandrif Posts: 1Questions: 0Answers: 0

try to get this data into Array (e.g data.length = 3)
...
if(data.length > 0){
for (var i=0;i<data.length;i++){
...
datum+= [ +' " ' + data[i].name +' "," '
+ data[i].firstName +' "," '
+ data[i].lastName ] +','

at the end:
$('#example').dataTable( {
data: datum
} );

will get the warning: "DataTables warning: Requested unknown parameter 0 for row 0"

But the DataTable is able to display the data if i type manually for "datum"
datum=
[
['aaaa','bbbb','cccc'],
['dddd','eeee','fffff'],
['gggg','hhhh','iiiii]
]

Please help newbie to DataTable.
TIA

This discussion has been closed.