title: using jquery, convert object of objects into an array, except last value
body: <p>Not sure if the title was descriptive enough so I'll describe my issue a little better here. I am making an AJAX call, in PHP I put together 30 objects, and add in the query I made to the end of the objects. From my understanding, within PHP I can only echo one object and that is what will return in the AJAX response. 
  On the PHP Side Looks like this </p>
  
  <pre><code>$data = json_encode($data);
  echo $data;
  </code></pre>
  
  <p>within my AJAX response i have a data object that will look like this</p>
  
  <pre><code>{object, object, object, query:"SELECT * FROM realForeclosure WHERE auctionStatus='SOLD' etc..."}
  </code></pre>
  
  <p>I need my objects to be separate from the query, because I want to loop through the objects and paint them into the UI. </p>
  
  <p>The solution I came up with, was to convert the object of objects into an array, 
  Than I need to find the key that = "query" and set that to a variable and pop that out of the array so it is separated.</p>
  
  <p>Is this the best way to do this?<br/>
  If so what would the code look like, would I use <code>$.grep</code> to isolate and remove the query from the original object? </p>