Anyone initializing datatables to sort by the last column?
Anyone initializing datatables to sort by the last column?

I am trying a negative column index, but that seems to not get processed into the right column offset, and causes an exception.
My code:
$('.generic-table').DataTable({
'order': [[-1, 'desc']]
});
This discussion has been closed.
Answers
Could not get the initialization to work. Ended up ordering after init:
I'm interested in the case you are working on where you don't know the number of columns. Why using
count-1
is harder?