title: Using $.ajax to return HTML & turn it into JavaScript array
body: <pre><code>var urlArray = window.location.pathname.split("/"),
      idFromUrl = urlArray[2],
      dataPath = "/bulletins/" + idFromUrl + "/data";
  
  $.ajax({
      url: dataPath,
      type: "get",
      dataType: "html",
      success: function (data) {
          var dataObj = data.replace(/&amp;quot;/g, '"');
  
          console.log(dataObj);
      }
  });
  </code></pre>
  
  <p>I'm grabbing the contents of an HTML page, and the contents on that page is super simple. It's just an "array", although it's plain text so when it returns, JavaScript is treating it as a string instead of an array. This is all that's on that HTML page:</p>
  
  <pre><code>[{"sermontitle":"test","welcome":"test","_id":"52e7f0a15f85b214f1000001"}]
  </code></pre>
  
  <p>Without replace the <code>&amp;quot;</code>'s, a <code>console.log</code> spits out <code>[{&amp;quot;sermontitle&amp;quot;:&amp;quot;test&amp;quot;,&amp;quot;welcome&amp;quot;:&amp;quot;test&amp;quot;,&amp;quot;_id&amp;quot;:&amp;quot;52e7f0a15f85b214f1000001&amp;quot;}]</code></p>
  
  <p>So my question is, how can I turn that HTML string (that's already in "array" form) into an actual array?</p>