Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82258

Access JSON object returned from server-side processing

$
0
0
Hi,

I would like to access JSON object returned by DataTable from PHP script. Right now I can add some data to the JSON (in PHP) like this
$output = array(
"table_header"=>$header, 
"sEcho" => intval($_GET['sEcho']),
"iTotalRecords" => 0,
"iTotalDisplayRecords" => 0,
"aaData" => array()
);

echo json_encode( $output );
and DataTables process it just fine (despite the additional item), but I can't find a way to read the returned object in javascript. Any idea how should I proceed to read the value of 'table_header' from the above code sample? Thank you.

Viewing all articles
Browse latest Browse all 82258

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>