I'm trying to build an array userRow{} using
$('#divResults tr').find('td:nth-child(2)').text();
which would return 12 first names, grabbing from a html table column Ex. John, Dave, ect..
$('#divResults tr').find('td:nth-child(3)').text();
returns middle names, ect.
what I've tried:
for ( var i=0; i < 12; i++) {
userRow[i]['jurorFN'] = $('#divResults tr').find('td:nth-child(2)').text();
userRow[i]['jurorMN'] = $('#divResults tr').find('td:nth-child(3)').text();
userRow[i]['jurorLN'] = $('#divResults tr').find('td:nth-child(4)').text();
}
which won't console.log anything
I want it to loop all of the items on the table and have it so if I alert userRow[1] it would output Dave, M, Johnson (first middle last) ect