title: Sorting a JSON response in Angular by keys
body: <p>Alright, I've been stuck on this one for a while and can't find an adequate solution out there. Basically, I've grouped the posts by date server-side and I want to sort the groups by decending date in Angular. I'm assuming a custom filter is the way to go but I haven't been able to get it to work.</p>
  
  <p>Here's some of the code:</p>
  
  <p>JSON Response:</p>
  
  <pre><code>{"September 20th":[{"id":5,"title":"Test 1","url":"www.google.com","tagline":"Test tagline 1","created_at":"2014-09-20T19:30:44.672Z","updated_at":"2014-09-20T19:30:44.672Z","vote_count":5}],"September 21st":[{"id":6,"title":"Test 2","url":"www.google.com","tagline":"Test tagline 2","created_at":"2014-09-21T00:00:00.000Z","updated_at":"2014-09-20T19:32:41.409Z","vote_count":8}]}
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code>&lt;section ng-controller='MainController'&gt;
      &lt;ul ng-repeat="(date, posts) in postList | filter?"&gt;
          &lt;h1&gt;{{ date }}&lt;/h1&gt;
          &lt;li ng-repeat='post in posts'&gt;
              &lt;p&gt;{{ post.vote_count }}&lt;/p&gt;
              &lt;button ng-click='upvote(post)' ng-disabled='!currentUser || hasVoted(post.id)'&gt;&lt;/button&gt;
              &lt;a href="{{ post.url }}"&gt;{{ post.title }}&lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;  
  &lt;/section&gt;
  </code></pre>
  
  <p>This displays the information perfectly, just in the incorrect order of dates. </p>
  
  <p>I appreciate any help you can give me!</p>