title: angularjs how to push a value to specific position of array
body: <p>I have a select dropdown which gets value from an array. I want to push a value to the first position of the array if the condition is true.</p>
  
  <pre><code>&lt;select name="child_age"&gt;
      &lt;option ng-repeat="child_age in age"&gt;{{child_age.childCount}}&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Child age Array
  $scope.age = [{childCount:'1 Yr'},{childCount:'2 Yrs'}];</p>
  
  <p>I want to push following Value to the first position.
      $scope.age.push({
      childCount: 'Child 1 Age'
      })</p>
  
  <p>But it has been added to the last position. </p>
  
  <p>Also I tried following code as well</p>
  
  <pre><code>$scope.age.splice(0,0,"Child 1 Age")
  </code></pre>
  
  <p>It shows the position. But not displaying the value</p>
  
  <p>Can anyone help me to solve this issue? Thanks</p>