title: Angular JS order select using key/value
body: <p>I just asked about generating a select from key/value map instead of array: <a href="https://stackoverflow.com/questions/18653307/angularjs-select-box-generated-from-object">AngularJS select box generated from object</a></p>
  
  <p>That is all working fine now: <a href="http://jsfiddle.net/UPWKe/1/" rel="nofollow noreferrer">http://jsfiddle.net/UPWKe/1/</a></p>
  
  <pre><code>&lt;select ng-model="current.addressCode" ng-options="value.code as value.name for (key, value) in student.address | orderBy: 'code'"&lt;/select&gt;
  </code></pre>
  
  <p>... and js ...</p>
  
  <pre><code>$scope.student = {
      address: {
          select: {
              code: "0",
              name: "Select proof of address"
          },
          letter: {
              code: "1",
              name: "Letter"
          },
          photograph: {
              code: "3",
              name: "Photograph"
          }
      },
  </code></pre>
  
  <p>But the only thing missing, is how to order the select items.</p>
  
  <p>How can I order select items in a select box generated from key/value map in angularjs?</p>