Here is my code so far and it pulls the data from a CSV. It creates only a single column, but I would like the data to populate into a max of 4 columns with as many rows as necessary. How can I do this?
--Just to note, the data was originally in a spreadsheet in two columns, Name Data, and the goal is to make each cell be Name:Data.

```
var test_data = data.split(/\r?\n|\r/);
var table_data = '<table>';
var count = 0;

for (var i = 0; i < test_data.length; i++) {
    var cell_data = test_data[i].split(",");
    table_data += '<tr>';
    for (var j = 0; j < cell_data.length - 1; j++) {
        if(i === 0) {
            table_data += '<th colspan="4">' + cell_data[j] + ":" + cell_data[j + 1] + '</th>';
        } else {
            table_data += '<td>' + cell_data[j] + ":" + cell_data[j + 1] + '</td>';
        }
    }
    alert(count);
    if (count == 3) {
        table_data += '</tr>';
        count = 0;
    } else {
        count += 1;
    }

    //table_data += '</tr>'
}
table_data += '</table>';
$('#loadData').html(table_data);

```