title: Using ng-repeat to iterate through an object with song names as indices
body: <p>I have an object that I created using song names so I could dynamically add and keep track of occurrences of songs in a series of playlists.
  Here is an example:</p>
  
  <blockquote>
    <p>{tracks: Object} 1,2,3 - Remix: Object  <br/>
    trackAlbum: "Greatest Hits" <br/>
    trackCount: 1 <br/>
    trackImage:<a href="https://i.scdn.co/image/26b654ecbe60b28397e6d8b5d829cebeeeb5590a" rel="nofollow">https://i.scdn.co/image/26b654ecbe60b28397e6d8b5d829cebeeeb5590a</a>" <br/>
    trackName: "1,2,3 - Remix"   <br/></p>
  </blockquote>
  
  <p>What I would like to do, is in the html, use ng-repeat to order each song by the trackCount (highest to lowest), and have it display in a list.
  Here is the current code:</p>
  
  <pre><code>&lt;div ng-app="myApp" ng-controller="myCtrl"&gt;
  &lt;form id = "playlistSearch" name="playlistForm"&gt;
  &lt;div class="form-group"&gt;
    &lt;label&gt;Spotify playlist search:&lt;/label&gt;
    &lt;input name = "search" ng-minlength = 3 placeholder = "Enter your    search.." ng-model = "playlist" class = "form-control" required&gt;&lt;/input&gt;
    &lt;p class = "help-block" ng-show = "playlistForm.search.$error.minlength"&gt;Enter 3+ characters&lt;/p&gt;
  &lt;/div&gt;
  
  &lt;div class = "form-group"&gt;
    &lt;button ng-disabled = "playlistForm.search.$invalid" class = "btn btn-primary" ng-click = "getPlaylists()" type = "submit"&gt;Submit&lt;/button&gt;
  &lt;/div&gt;
  &lt;/form&gt;
  &lt;div class = "container-fixed, results"&gt;
   &lt;ol&gt;
   &lt;li ng-repeat = "track in allTracks | orderBy: 'trackCount'"&gt; {{allTracks.trackName}} {{allTracks.trackAlbum}} {{allTracks.trackCount}}&lt;/li&gt;                                                       
    &lt;/ol&gt;
  &lt;/div&gt;
  </code></pre>