I want to extract data from an html table like
<table> <tr> <th> Header1 </th> <th> Header2 </th> <th> Header3 </th> </tr> <tr> <td> Value 1,1 </td> <td> Value 2,1 </td> <td> Value 3,1 </td> </tr> ... rows ... </table>
and get the arrays:
array for headers
2d array for column values (or an array for each column)
How to do it using jQuery?
I do not need to serialize it or put it in a JSON object, because I want to use it to render a chart.
related to general design:
At the moment I have something like
1. ajax query returns html table 2. use jQuery to get values from html table 3. render chart
does it make sense to throw a JSON object from an ajax request and then display a table and chart?
source share