title: How to parse and use both HTML and variable with AJAX?
body: <p>I am sending a JS file a bunch of HTML. The JS file simply uses JQuery to render the HTML to the page, eg:</p>
  
  <pre><code>$.ajax({
    url: '/ajax/nocache/someurl',
    type: 'html',
    success: function(html) {
      $('.wrapper').html(html);
    }
  });
  </code></pre>
  
  <p>This works fine.</p>
  
  <p>However, I now need to send an array of data, eg:</p>
  
  <pre><code>  [
      'hash' =&gt; $hash,
      'html' =&gt; $rendered_html,
    ]
  </code></pre>
  
  <p>I am unsure how to modify my JS above to accept and use both the HTML and hash.</p>
  
  <p>Would anyone know how I could go about this?</p>