We have a REST API that emits JSON, from where we can use the source data (using AJAX). We want to make AJAX calls when each call retrieves a small piece of data (say 5000 lines or so), and then it is written to the CSV file in the browser as a download.
It seems that if we have all the data in the JS memory, then writing it to a CSV file is not difficult, but if we want to write 100K records, then we are forced to take all 100K in one shot, and then create the file in one go.
Instead, we feel that it will be much softer on the server and client to load small chunks and transfer them to a file. Is there any way to do this?
(We are currently using jQuery 2.0.0, but do not mind using another library to do this)
source share