I have json in this format:
[
{"aaa":"aaa"},
{"Columns":[
[{"bbb":"bbbb"}, {"name":"name1"}, {"gender":"gender1"}],
[{"bbb":"bbbb"}, {"name":"name2"}, {"gender":"gender2"}],
]}
]
I tried:
$(document).ready(function() {
$('#example').DataTable( {
"ajax": "data/file.txt",
"columns": [
{ "data": "Columns.0.name" },
{ "data": "Columns.0.gender" },
]
} );
} );
but it gave me an error: Uncaught TypeError: Cannot read property 'length' of undefined
How should I read name and gender? Thanks.