User839733648 posted
Hi zhyanadil.it@gmail.com,
According to your description, I suggest that you could traverse the value and remove the extra td.
Here is a working demo.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script>
$(function () {
$("#testid").click(function () {
$("table").each(function () {
var $this = $(this);
var newrows = [];
$this.find("tr").each(function () {
var i = 0;
$(this).find("td").each(function () {
i++;
if (newrows[i] === undefined) { newrows[i] = $("<tr></tr>"); }
newrows[i].append($(this));
});
});
$this.find("tr").remove();
$.each(newrows, function () {
$this.append(this);
});
});
return false;
});
})
</script>
</head>
<body>
<table border="1">
<tbody>
<tr>
<td>01</td>
</tr>
<tr>
<td>02</td>
</tr>
<tr>
<td>03</td>
</tr>
<tr>
<td>04</td>
</tr>
</tbody>
</table>
<br/>
<input id="testid" type="button" value="convert table" />
</body>
</html>
result:

Best Regards,
Jenifer