JSON

JSON

herbivoreherbivore Posts: 2Questions: 1Answers: 0

Hi,

Just getting started with DataTables and had a quick question regarding how it (as well as js)
interacts with JSON files. I have a number of JSON files that I would like to parse and display
particular information from. By default, there is basically one file for each row entry.

I was wanting to avoid having to filter and concatenate each of these into one larger file prior
to passing them on to DT to display.

Is it possible for DT/js be configured to loop over each of these and filter/display only specific
info (the same subset of info for each file) in this way?

Thanks for any help!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,881Questions: 1Answers: 10,530 Site admin
    Answer ✓

    DataTables itself won't loop over a list of files making Ajax requests for their data, but there is no reason why you couldn't do that yourself and use the API to have the data you want to display in the table shown.

    rows.add() and clear() are the API methods you are most likely to want to use.

    Allan

  • herbivoreherbivore Posts: 2Questions: 1Answers: 0

    ok, thanks!

This discussion has been closed.