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

Pass dynamic html table definition to DataTables

$
0
0
I am just beginning the use of the DataTables API, and I have a situation that I need assistance with.

I am retrieving a JSON from the server in a specific format similar to the following:
{data
    0: 6 // number of elements in the JSON
    1:{
          name: [name]
          Address1: [address1]
          Address2: [address2]
          City: [City]
          State: [State]
          zip: [zip]
    }
    2:{
          name: [name]
          Address1: [address1]
          Address2: [address2]
          City: [City]
          State: [State]
          zip: [zip]
    }
...
}

I can create the HTML table from the JSON , but can I pass the table HTML to the DataTables API directly? If so, how? If not, is there another method to get this data into the DataTables API? The formatting of the JSON is standardized and not easily changed.

Viewing all articles
Browse latest Browse all 82001

Trending Articles



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