Answers for "jquery get table to object"

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 "Javascript"

Browse Popular Code Answers by Language