I am currently using Datatables to display three columns with a varying number of rows of information.
The table is setup so that when a column header is clicked the table is sorted in reference to that column. I am trying to use fnGetData to get the visible data that is now sorted. However, my attempt simply returns the original data the table was initialized with.
This is a roughly what the code looks like:
$("#example").click(function() {
oTable = $('#' + tableName).dataTable();
var secondCellArray=[];
$.each( oTable.fnGetData(), function(i, row){
secondCellArray.push( row[0],row[1],row[2]);
})
console.log( secondCellArray)
});