How to loop through all rows in DataTables jQuery?

前端 未结 4 2042
-上瘾入骨i
-上瘾入骨i 2020-12-25 12:54

I am using jquery plugin DataTables for building nice table

  var table = $(\'#example\').DataTable({
    \"data\": source
});
4条回答
  •  忘掉有多难
    2020-12-25 13:38

    I finally found:

     var data = table.rows().data();
     data.each(function (value, index) {
         console.log(`For index ${index}, data value is ${value}`);
     });
    

提交回复
热议问题