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

Loading Datatables from JSON Problem

$
0
0

Hello,

I'm trying to take the following formatted JSON:

{
"status": "success",``
"data": {
"query": {
"numrows": 100,
"queryname=": "X_SR_OPEN_CLASSES",
"rows": [
{
"attr:rownumber": 1,
"STRM": "2203",
"CAMPUS": "CITY",
"SUBJECT": "BCAS",
"CATALOG_NBR": "  85",
"CRSE_DESCR": "Carpenter Apprentice I",
"CLASS_NBR": 27798,
"SEATS": "25",
"ROOM": "City-CLSRM",
"LOCATION": "Off Campus",
"START_DT": "2020-01-21",
"END_DT": "2020-06-01",
"EXPR29_29": "17:00",
"EXPR30_30": "18:25",
"EXPR31_31": "TTh",
"NAME": "SAMPLE, NAME",
"EMAIL_ADDR": "CSDEV92@erpdev.loc",
"EXPR19_19": ""
},

But when I load the tables I get a blank table, no error dialog pops up. Here's the javascript I'm using:

<script>
  $(document).ready(function() {
    $('#example').DataTable( {
      "processing": true,
      "ajax": {
        "url": "open_classes.json",
        "dataSrc": "rows",
      },
      "columns": [
        { "data": "STRM" },
        { "data": "SUBJECT" },
        { "data": "CATALOG_NBR" },
        { "data": "CRSE_DESCR" },
        { "data": "CLASS_NBR" }
      ]
    } );
  } );
</script>

Any assistance would be greatly appreciated.

Thank you.


Viewing all articles
Browse latest Browse all 81986

Trending Articles



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