Here is the HTML:
<table>
<tbody>
<tr>
<td>1</td>
<td>one</td>
</tr>
<tr>
<td>2</td>
<td>two</td>
</tr>
</tbody>
</table>
Now I need to make an array of the second column of this table as follows:
var arr = ['one', 'two'];
How can i do this?
I can select a table like this $('table')and get its contents as follows: $('table td+td')but I don’t know how I can create an array from them.
stack source
share