Answers for "get table rows as object with jquery"

1

jquery grab table row

$('.itemTable').eq(2);
//this will grab the 3rd row of the table with the class itemTable
Posted by: Guest on March-24-2020
0

jquery get table to object

var tbl = $('#students tr:has(td)').map(function(i, v) {
    var $td =  $('td', this);
        return {
                 id: ++i,
                 name: $td.eq(0).text(),
                 age: $td.eq(1).text(),
                 grade: $td.eq(2).text()               
               }
}).get();
Posted by: Guest on November-11-2020

Code answers related to "get table rows as object with jquery"

Code answers related to "Javascript"

Browse Popular Code Answers by Language