title: How to display json data in DataTable view?
body: <p>I am trying to display a large json data. I am tryin to replicate the method <a href="https://datatables.net/extensions/scroller/examples/initialisation/server-side_processing.html" rel="nofollow noreferrer"><strong>here</strong></a> using my own data. The data is stored in a hidden container.</p>
  
  <p>my HTML:  </p>
  
  <pre><code>&lt;div id="div_permintaan" class="ibox-content" style="width:90%; margin-left:5%; margin-right:5%;"&gt;
  &lt;table width="100%" cellpadding="5" cellspacing="0" id="tbl_list_permintaan" class="table table-striped table-bordered table-hover dataTables" border="0"&gt;
  &lt;thead&gt;     
      &lt;tr&gt;
          &lt;th&gt;No.&lt;/th&gt;
          &lt;th&gt;id&lt;/th&gt;
          &lt;th&gt;date&lt;/th&gt;               
          &lt;th&gt;unit&lt;/th&gt;
          &lt;th&gt;note&lt;/th&gt;
          &lt;th&gt;Status&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;    
  &lt;/table&gt;
  &lt;textarea id="container-permintaan"&gt;&lt;?php echo json_encode($permintaan); ?&gt;&lt;/textarea&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My current jquery:  </p>
  
  <pre><code>$('.dataTables').DataTable( {
      serverSide  : true,
      ordering    : false,
      searching   : false,
      ajax: function (data, callback, settings) {
  
  
          setTimeout( function () {
              callback( {
                  draw: data.draw,
                  data: JSON.parse($('#container-permintaan').val())
              } );
          }, 50 );
  
  
      },
      scrollY: 200,
      scroller: {
          loadingIndicator: true
      }
  } )
  </code></pre>
  
  <p>some of the data:  </p>
  
  <pre><code>[{"id":"CEK530","date":"05\/09\/2007","unit":"KC JAKARTA HASANUDIN","note":"G.239101-G.240100","status":"3"},{"id":"05\/10\/16 kedoya","date":"10\/05\/2016","unit":"KCP JAKARTA KEDOYA","note":"","status":"3"},{"id":"110116","date":"11\/07\/2016","unit":"KC PATI","note":"","status":"3"},{"id":"18\/1551-3\/042","date":"14\/07\/2016","unit":"KC BANDARLAMPUNG","note":"","status":"3"},{"id":"18\/368-3\/306","date":"19\/07\/2016","unit":"KCP BULELENG","note":"","status":"3"},{"id":"18\/1221-3\/402","date":"27\/07\/2016","unit":"KC LHOKSEUMAWE","note":"","status":"3"},{"id":"18\/1264-3\/ID00100012","date":"02\/08\/2016","unit":"KC PEKALONGAN","note":"","status":"3"},{"id":"18\/1385-3\/322","date":"02\/08\/2016","unit":"KCP TANJUNG BALAI KARIMUN","note":"","status":"3"},{"id":"18\/834-3\/571","date":"03\/08\/2016","unit":"KCP PEKALONGAN KAJEN","note":"","status":"3"},{"id":"04\/08\/16 tendean","date":"04\/08\/2016","unit":"KCP JAKARTA TENDEAN","note":"","status":"3"},{"id":"18\/078-3\/648","date":"04\/08\/2016","unit":"KCP JAKARTA TENDEAN","note":"","status":"3"},{"id":"017\/057-I\/2016","date":"09\/08\/2016","unit":"KC DUMAI","note":"","status":"3"},{"id":"BG1","date":"09\/08\/2016","unit":"KCP JAKARTA MENTENG","note":"T.062151-T.063150","status":"2"},{"id":"CEK1","date":"09\/08\/2016","unit":"KCP JAKARTA MENTENG","note":"F.633101-F.634100","status":"3"},{"id":"CEK10","date":"09\/08\/2016","unit":"KCP PASURUAN","note":"F.642101-F.643100","status":"3"},{"id":"CEK11","date":"09\/08\/2016","unit":"KC MAKASSAR","note":"F.643101-F.644100","status":"3"},{"id":"CEK12","date":"09\/08\/2016","unit":"KCP BANJAR","note":"F.644101-F.645100","status":"3"},{"id":"CEK13","date":"09\/08\/2016","unit":"KCP YOGYAKARTA KATAMSO","note":"F.645101-F.646100","status":"3"},{"id":"CEK2","date":"09\/08\/2016","unit":"KC JAKARTA THAMRIN","note":"F.634101-F.635100","status":"3"},{"id":"CEK3","date":"09\/08\/2016","unit":"KC MEDAN AKSARA","note":"F.635101-F.636100","status":"3"},{"id":"CEK4","date":"09\/08\/2016","unit":"KC BATURAJA","note":"F.636101-F.637100","status":"3"},{"id":"CEK5","date":"09\/08\/2016","unit":"KCP CIAMIS","note":"F.637101-F.638100","status":"3"},{"id":"CEK6","date":"09\/08\/2016","unit":"KCP SAMARINDA HASAN BASRI","note":"F.638101-F.639100","status":"3"},{"id":"CEK7","date":"09\/08\/2016","unit":"KCP BANDUNG UJUNG BERUNG","note":"F.639101-F.640100","status":"3"},{"id":"CEK8","date":"09\/08\/2016","unit":"KC TEGAL","note":"F.640101-F.641100","status":"3"},{"id":"20\/027-3\/202","date":"19\/01\/2018","unit":"KCP BALIKPAPAN KEBUN SAYUR","note":"","status":"1"},{"id":"20\/043-3\/184","date":"19\/01\/2018","unit":"KCP SURABAYA KLAMPIS","note":"","status":"1"}]
  </code></pre>