title: orderBy not working as expected: Angularjs
body: <p>My array is : <code>BS</code>. Its structure is : </p>
  
  <pre><code>Array[317]
  0: Object
     $$hashKey: "022"
     name: "Los Angeles Comm."
  .
  .
  .
  ..
  </code></pre>
  
  <p>BS is an array. Each value is a JSon object with filed of name.</p>
  
  <p>I want to sort all the values of BS according to their name. I am trying :</p>
  
  <pre><code>&lt;option ng-repeat="item in BS | orderBy:item.name"  value="{{item.name}}"&gt;{{item.name}}&lt;/option&gt;
  </code></pre>
  
  <p>I have also tried : <code>orderBy:name</code> and <code>orderBy:item[name]</code>. Nothing works. Why is this not working and whats the correct code?</p>