title: Move element to first position in array
body: <p>I have an object like this:</p>
  
  <pre><code>var data = [
      { id: "fmgbwe45", age: 24, gender: "male"   },
      { id: "kjregh23", age: 27, gender: "female" }, 
      { id: "kjfdhg87", age: 30, gender: "male" }, 
      { id: "lsdjfk43", age: 10, gender: "female" }, 
  ]
  </code></pre>
  
  <p>I want to sort the object, this is my 
  expected output:</p>
  
  <pre><code>var data = [
      { id: "kjfdhg87", age: 30, gender: "male" },  //only one record will match in my sort
      { id: "fmgbwe45", age: 24, gender: "male"   },
      { id: "kjregh23", age: 27, gender: "female" }, 
      { id: "lsdjfk43", age: 10, gender: "female" }, 
  ]
  </code></pre>
  
  <p>I have tried this:</p>
  
  <pre><code>$scope.sort_by = function (newSortingOrder) {
      var stringToFilter = newSortingOrder.toString();   //this holds 'kjfdhg87'
      var obj = data.sort(function(o) { return o.id - stringToFilter; });
      var finalObj = [obj];
      sortedData = finalObj;
      console.log(sortedData ); //sorting is not working as expected where im doing wrong.
  }
  </code></pre>