title: JSON.stringify an Array of HTML Elements/Strings
body: <p>How can we convert this Javascript Array  <code>[li.one, li.one, li.one, li.two, li.two, li.two]</code> into a JSON array using JSON.stringify? </p>
  
  <p>Using the following Javascript:</p>
  
  <pre><code>    var stringsToStringify = $('.one, .two'),
              stringArray = []
  
      $.each(stringsToStringify, function (i, v) {
          stringArray[i] = v
      })
  
      console.log(stringArray)
      var jsonString = JSON.stringify(stringArray)
      console.log(jsonString)
      console.log(JSON.parse(jsonString))
  </code></pre>
  
  <p>Returns: </p>
  
  <pre><code> [li.one, li.one, li.one, li.two, li.two, li.two]
  
  [{"jQuery110203514890133216494":1},{"jQuery110203514890133216494":2},{"jQuery110203514890133216494":3},{"jQuery110203514890133216494":4},{"jQuery110203514890133216494":5},{"jQuery110203514890133216494":6}]
  
  [Object { jQuery110203514890133216494=1}, Object { jQuery110203514890133216494=2}, Object { jQuery110203514890133216494=3}, Object { jQuery110203514890133216494=4}, Object { jQuery110203514890133216494=5}, Object { jQuery110203514890133216494=6}]
  </code></pre>
  
  <p><br/>
  If we change the <code>stringArray</code> from <code>[]</code> to <code>{}</code> the following is returned:</p>
  
  <pre><code> [li.one, li.one, li.one, li.two, li.two, li.two]
  
  [{"jQuery110207305097851789301":1},{"jQuery110207305097851789301":2},{"jQuery110207305097851789301":3},{"jQuery110207305097851789301":4},{"jQuery110207305097851789301":5},{"jQuery110207305097851789301":6}]
  
  [Object { jQuery110207305097851789301=1}, Object { jQuery110207305097851789301=2}, Object { jQuery110207305097851789301=3}, Object { jQuery110207305097851789301=4}, Object { jQuery110207305097851789301=5}, Object { jQuery110207305097851789301=6}]
  </code></pre>
  
  <p>The desired result is to have <code>[li.one, li.one, li.one, li.two, li.two, li.two]</code> "stringified" into a JSON Array.</p>
  
  <p>This looks like a circular reference. What is the best way to supply the array of html elements to <code>JSON.stringify</code>?</p>
  
  <p><a href="http://jsfiddle.net/v7jm3c3r/" rel="nofollow">Fiddle</a></p>