Friday, 30 August 2013

Convert a HTML Table to JSON

Convert a HTML Table to JSON

I'm trying to convert a table I have extracted via BeautifulSoup into
JSON. So far I've managed to isolate all the rows, though I'm not sure how
to work with the data from here. Any advice would be very much
appreciated.
[<tr><td><strong>Balance</strong></td><td><strong>$18.30</strong></td></tr>,
<tr><td>Card name</td><td>Name</td></tr>,
<tr><td>Account holder</td><td>NAME</td></tr>,
<tr><td>Card number</td><td>1234</td></tr>,
<tr><td>Status</td><td>Active</td></tr>]
(Line breaks mine for readability)
Thanks,
Declan

No comments:

Post a Comment