JSFiddle - React, Tailwind, and code Playground
HTML
<table id="test">
<tr>
<td>test1<td>
</tr>
<tr>
<td>test2<td>
</tr>
<tr>
<td>test1a<td>
</tr>
<tr>
<td>test2<td>
</tr>
</table>
JavaScript
$(function () {
$("#test td").each(function () {
var tdText = $(this).text();
$("#test td")
.filter(function () {
return tdText == $(this).text();
})
.not(":first")
.remove();
});
});