title: AngularJS - orderBy value when ng-repeat by key, value pair
body: <p>I have counted the ocurrences of each item in a set of data with countBy function in lodash, and the result is this:</p>
  
  <pre><code>$scope.colors= {
  "Orange": 3,
  "Blue": 2,
  "Pink": 1,
  "Red": 1,
  "Black": 2,
  };
  </code></pre>
  
  <p>Now I would like to display the data and order it by its value. I've tried with</p>
  
  <pre><code>&lt;div ng-controller="myCtrl" ng-app="myApp"&gt;
      &lt;ul&gt;
        &lt;li ng-repeat="(key,value) in colors | orderBy:value"&gt;
          {{key}} ({{value}})
        &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>But the orderBy filter doesn't seem to do the trick (see the plunkr <a href="http://plnkr.co/edit/N7RqtdzT4DQGhquQXxnJ?p=preview" rel="nofollow">here</a>)</p>
  
  <p>Is there any way to do it with the current data form, or is it a better way to structure the data in order to achieve the desired result? Thanks in advance!</p>