Create jsonarray from dom/table cells

Create jsonarray from dom/table cells

Want to create jsondata from table cells:

For instance: Table cells with unique ids with class "data" should become jsondata:

{"Cell1id":"Cellid1 innerhtml","Cell2id":"Cellid1 innerhtml",etc etc}

What is the easiest way to do this?