I have 100 000 lines and i want to export them to CSV, i did manage to export it for few lines but many thousands of lines return network error to my browser and i cannot download it.
let csvContent = "data:text/csv;charset=utf-8,";
csvContent += [
Object.keys(payload[0]).join(";"),
...payload.map(item => Object.values(item).join(";"))
]
.join("\n")
.replace(/(^\[)|(\]$)/gm, "");
const data = encodeURI(csvContent);
const link = document.createElement("a");
link.setAttribute("href", data);
link.setAttribute("download", "export.csv");
link.click();