I'm trying to pass some data to DataTables as an array, initialized to a variable that I have tried to initialize as an array. I have also tried wrapping the array up as JSON per the examples on Datatables website, adding an encircling pair of braces, and setting "data" to equal the array. That JSON validates correctly with JSONLint. However, in all of these cases, Datatables gives me the dreaded:
"DataTables warning: Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"
Here, and in the JSFiddle, is a minimal example:
var dataIn = [
["ma\u02d0hu ha\u02d0\u00f0a", "What?", "Final 'what' interrogative in each Yemen series is object, subject interrogatives are marked for gender", "Y24", "closed-class,interr.what,masculine,subject", "Behnstedt85YemenAtlas: m. 60", "red"],
["ma\u02d0hu\u02d0\u00f0e\u0294", "What?", "Final 'what' interrogative in each Yemen series is object, subject interrogatives are marked for gender", "Y156", "closed-class,interr.what,masculine", "Behnstedt85YemenAtlas: m. 60", "red"]
];
$(document).ready(function(){
$("#results").dataTable({
"ajax" : dataIn
});
});
$('#example').DataTable( { data: data } );if you not get data by ajax