JSFiddle - React, Tailwind, and code Playground

HTML

<table>
<thead>
<tr><th>Column 1</th><th>Column 2</th><th>Column 3</th></tr>
</thead>
<tbody>
<tr><td>A1</td><td>A2</td><td>A3</td></tr>
<tr><td>B1</td><td>B2</td><td>B3</td></tr>
<tr><td>C1</td><td>C2</td><td>C3</td></tr>
</tbody>
</table>

JavaScript

var $table = $("table")
    rows = [],
    header = [];

$table.find("thead th").each(function () {
    header.push($(this).html());
});

$table.find("tbody tr").each(function () {
    var row = {};
    
    $(this).find("td").each(function (i) {
        var key = header[i],
            value = $(this).html();
        
        row[key] = value;
    });
    
    rows.push(row);
});
    
    
alert(JSON.stringify(rows));