I’m trying to create a simple array with jquery from a table with only rows, but a row can contain multiple time elements.
I could only find solutions for tables with single td values and no children…
This is my table:
<div id="customhours">
<table>
<tbody>
<tr>
<td>Tuesday</td>
<td>
<time>17:00 - 18:00</time>
</td>
</tr>
<tr>
<td>Friday</td>
<td>
<time>16:00 - 17:00</time>
<time>17:00 - 18:00</time>
</td>
</tr>
</tbody>
</table>
</div>
The array I’m looking for is:
[["Tuesday", "17:00 - 18:00"], ["Friday", ["16:00 - 17:00, 17:00 - 18:00"]]]
Any help would be appreciated.