I have a JSON object 2D associative array (?) created using PapaParse (the data object has 193 lines and 49 columns). I want to dynamically add it to my web page. The code below uses jQuery and works but is very slow. Is there a faster way?
Note: I've given the cells unique IDs because I want the user to be able to choose, interactively, certain columns to keep...
$('<table/>', {
'id' : 'dataTable'
}).appendTo("body");
$('<tbody/>', {
"id": "dataTableBody",
}).appendTo("#dataTable");
// cycle through values and add data to table
for (var i = 0; i < Parseddata.length; i++) {
$('<tr/>', {
"id":"dataTableRow_"+i
}).appendTo("#dataTableBody");
for (var j = 0; j < Parseddata[0].length; j++) {
$('<td/>', {
"id":"dataTableColumn_"+j,
"text":Parseddata[i][j]
}).appendTo("#dataTableRow_"+i).css({"border":"solid white 1pt"});
};
};