https://datatables.net/examples/basic_init/table_sorting.html
$(document).ready(function() {
$('#example').DataTable( {
"order": [[ 3, "desc" ]]
} );
} );
The example in the documentation uses array of arrays as a source and defines ordering by specifying indices.
How can I specify default ordering when the source is array of objects.
I tried to write it as
"order": [[ "attribute_name", "desc" ]]
but it doesn't work. I get this error
Uncaught TypeError: Cannot read property 'aDataSort' of undefined