fnGetData return JSON

fnGetData return JSON

cfanscfans Posts: 8Questions: 0Answers: 0
edited November 2010 in General
Is it possible to use fnGetData (or is there another method) to get the original JSON data... not just the array or strings.

Replies

  • vanemastervanemaster Posts: 1Questions: 0Answers: 0

    Well, maybe this isn't the best solution, but you can get around with the following:

    var json_obj = new Array();
    oTable = $('#tb_subset').dataTable();
    $.each( oTable.fnGetData(), function(i, row){
        json_obj.push({first_row:row[0], second_row:row[1]});
    });
    
  • allanallan Posts: 63,687Questions: 1Answers: 10,500 Site admin

    You can use ajax.json() to get the original data.

    Allan

This discussion has been closed.