I would suggest 2 options:
Get the values from the table and construct an array of values where you can map later as in an Angular project. Check the links: getElementByTagName, get table cells
Rconstruct the HTML element
Delete the useless data
<td style="border: 1px solid black; border-collapse: collapse;">----</td>
Detect the row for the age (number) and use it as input. That would be a super job to be done and not worth it. Assuming you have a normal table not with a single person.
Extra suggestion. Ask for a better API.