I would like to convert an HTML ul list into a json format.
The html list is in this format:
<li><span class="orgname">Adams Center Free Library</span> <span class="status">Closed</span></li>
<li><span class="orgname">Weight Watchers Watertown</span> <span class="status">Delayed</span></li>
I'd like it to be in a json format like this:
{
"meta": {
"closed_count": "1",
"delayed_count": "1"
},
"list": [
{
"data": {
"orgname": "Adams Center Free Library",
"status": "Closed"
}
},
{
"data": {
"orgname": "Weight Watchers Watertown",
"status": "Delayed"
}
}
]
}
Can someone help me out with this?