JSFiddle - React, Tailwind, and code Playground
by joycse06
HTML
<div id="mainDiv">
<table></table>
<table></table>
<table>
<tr>
<td id="first">FirstCell</td><td id="second">SecondCell</td>
</tr>
<tr>
<td></td><td></td>
</tr>
</table>
</div>
JavaScript
$("#mainDiv tr td:contains('First')").each(function(){
var secondCell = $(this).next().text();
console.log(secondCell);
});