title: extracting array data from (data) in an AJAX call
body: <p>This does not answer the question - <a href="https://stackoverflow.com/questions/13323393/jquery-ajax-return-html-and-json-data">jQuery Ajax return html AND json data</a></p>
  <p>I can not use the wrap method because I do not have a single html string. I am not using <strong>Phery</strong>, I have tried the first option here and the second nested call runs before the first so that data is undefined- <a href="https://stackoverflow.com/questions/65984992/jquery-use-two-done-callbacks-in-same-function-one-with-datatype-json-one-witho?noredirect=1#comment116665821_65984992">jquery Use two done callbacks in same function, one with datatype json one without</a>  and we are not using html5 only for this. Therefore the referenced answer does not address the question.</p>
  <p>In my <code>.done</code> function I have (data) returning. This data is a mixture of php <code>echo</code>'s and a single <code>JSON_encode</code> array. Sample data:</p>
  <pre><code>.....
  //other divs and data above this point
  &lt;div id=&quot;test&quot;&gt;text&lt;/div&gt;
  {&quot;ids&quot;:[&quot;1&quot;,&quot;5&quot;,&quot;2&quot;,&quot;6&quot;]}0
  </code></pre>
  <p><strong>AJAX</strong></p>
  <pre><code>.done(function(data) {
  console.log(data);
  func2(json_string)
  })
  </code></pre>
  <p>I want to be able to extract and separately work with the array {&quot;ids&quot;:[&quot;1&quot;,&quot;5&quot;,&quot;2&quot;,&quot;6&quot;]}0. I am trying to pass it along to another function, but only that portion of the data</p>