title: Move item in array to last position
body: <p>I have an array of objects. I want to move a selected object to the last position in the array. How do I do this in javascript or jquery?</p>
  
  <p>Here is some code I have:</p>
  
  <pre><code>var sortedProductRow = this.product_row;
  
  for (var s in sortedProductRow) {
      if (sortedProductRow[s]["parent_product_type"] != "")
          // Move this object to last position in the array
  }
  </code></pre>
  
  <p>I'm looping through this with a for loop, and I want the output to be ordered so that all objects that does not have a "parent_product_type" value comes first, then those with a value.</p>