Get Only table data

Get Only table data

vineela374vineela374 Posts: 17Questions: 8Answers: 0

I used $('#table').DataTable().rows().data();
This gave a lot of un-necessary information How do I just get the table data instead?

"oScroll":{"bCollapse":false,"iBarWidth":17,"sX":"","sXInner":"","sY":100},"oLanguage":{"fnInfoCallback":null,"oAria":{"sSortAscending":": activate to sort column ascending","sSortDescending":": activate to sort column descending","hungarianMap":{"sortAscending":"sSortAscending","sortDescending":"sSortDescending"}},"oPaginate":{"sFirst":"First","sLast":"Last","sNext":"Next","sPrevious":"Previous","_hungarianMap":{"first":"sFirst","last":"sLast","next":"sNext","previous":"sPrevious"}},"sEmptyTable":"No data available in table","sInfo":"Showing _START to END of TOTAL entries","sInfoEmpty":"Showing 0 to 0 of 0 entries","sInfoFiltered":"(filtered from MAX total entries)","sInfoPostFix":"","sDecimal":"","sThousands":",","sLengthMenu":"Show MENU entries","sLoadingRecords":"Loading...","sProcessing":"Processing...","sSearch":"Search:","sSearchPlaceholder":"","sUrl":"","sZeroRecords":"No matching records found","_hungarianMap":{"aria":"oAria","paginate":"oPaginate","emptyTable":"sEmptyTable","info":"sInfo","infoEmpty":"sInfoEmpty","infoFiltered":"sInfoFiltered","infoPostFix":"sInfoPostFix","decimal":"sDecimal","thousands":"sThousands","lengthMenu":"sLengthMenu","loadingRecords":"sLoadingRecords","processing":"sProcessing","search":"sSearch","searchPlaceholder":"sSearchPlaceholder","url":"sUrl","zeroRecords":"sZeroRecords"}},"oBrowser":{"bScrollOversize":false,"bScrollbarLeft":false,"bBounding":true,"barWidth":17},"ajax":null,"aanFeatures":[],"aoData":[{"nTr":{"_DT_RowIndex":0},"anCells":[{"_DT_CellIndex":{"row":0,"column":0},"_yuid":"aui_3_4_0_1_446"},{"_DT_CellIndex":{"row":0,"column":1},"_yuid":"aui_3_4_0_1_439"},{"_DT_CellIndex":{"row":0,"column":2}},{"_DT_CellIndex":{"row":0,"column":3},"_yuid":"aui_3_4_0_1_448"}],"_aData":{"productid":12055191,"reportTitle":"US Quant Panaroma","audiocastTitle":"US Quant Panaroma","analystName":"Nigel Tupper","reportDateTime":"10/22/2019 09:40","reportPublishStatus":"Published","rankOrder":1},"_aSortData":null,"_aFilterData":null,"_sFilterRow":null,"_sRowStripe":"odd","src":"data","idx":0},{"nTr":{"_DT_RowIndex":1},"anCells":[{"_DT_CellIndex":{"row":1,"column":0},"_yuid":"aui_3_4_0_1_445"},{"_DT_CellIndex":{"row":1,"column":1},"_yuid":"aui_3_4_0_1_440"},{"_DT_C

Answers

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    edited November 2019

    If I understand your question... rows().data() returns and API instance that includes an array of the table data. You can use toArray() to get just the array of data, like this: $('#table').DataTable().rows().data().toArray();.

    Kevin

  • vineela374vineela374 Posts: 17Questions: 8Answers: 0

    this worked! Thank you so much!

This discussion has been closed.