JSFiddle - React, Tailwind, and code Playground

by HattrickNZ

HTML

<script src="https://code.jquery.com/jquery-1.11.3.min.js"></script>
<table id="mytable">
  <tr>
    <th>Customer Id</th>
    <th>Result</th>
  </tr>
  <tr>
    <td>123</td>
    <td>abc</td>
  </tr>
  <tr>
    <td>456</td>
    <td>def</td>
  </tr>
  <tr>
    <td>789</td>
    <td>ghi</td>
  </tr>
</table>

JavaScript

$('#mytable tr').each(function() {
    var customerId = $(this).find("td:first").html();    
});


//OPTION 2 
//To select a particular cell, you can reference them with an index:
$('#mytable tr').each(function() {
    var customerId = $(this).find("td").eq(0).html();    
    console.log(customerId)
});