How to save searched data as json
How to save searched data as json
inajaf
Posts: 13Questions: 8Answers: 0
Guys, how to save temporary data in JSON format after searching(after filtering) in data tables. I need to export to excel via Php spreadsheet the data after filtration in data tables without using the native Export function in data tables.
Thank you.
Answers
Use the
rows().data()
with theselector-modifier
of{search:'applied'}
to get the filtered rows. Chain thetoArray()
API for the result to be a Javascript object. Then use JSON.stringifiy() to convert to a JSON string.Kevin