i have C++ program exporting log files as HTML table and I wanted to know if there is any way that i can parse that table(something like this):
<table>
<tr><td>id</td><td>value1</td><td>value2</td></tr>
<tr><td>0 </td><td>0 </td><td>0 </td></tr>
<tr><td>0 </td><td>1.5 </td><td>2.15 </td></tr>
</table>
into a JSON array (something like this) using a Javascript function:
var chartData = [
{id:"0",value1:"0",value2:"0"},
{id:"1",value1:"1.5",value2:"2.15"}];
The problem is that I want this function to work for every table given to it, with any possible row or column count(first row is always a header).
chartDatais a normal JavaScript array, not JSON (something must be wrong today, so many people confusing this).