title: creating json from DOM elements using jQuery
body: <p>If I have the following DOM elements</p>
  
  <pre><code>&lt;div class="item"&gt;content1&lt;/div&gt;
  &lt;div class="item"&gt;content2&lt;/div&gt;
  </code></pre>
  
  <p>how, using jQuery and Javascript, do I construct a JSON object like the following?</p>
  
  <pre><code>[{ 
  'classname': 'item',
  'content': 'content1'
  }
  {
  'classname': 'item',
  'content': 'content2'
  }]
  </code></pre>
  
  <p>Any recommended further reading?</p>