If I have the following DOM elements
<div class="item">content1</div>
<div class="item">content2</div>
how, using jQuery and Javascript, do I construct a JSON object like the following?
[{
'classname': 'item',
'content': 'content1'
}
{
'classname': 'item',
'content': 'content2'
}]
Any recommended further reading?