title: Ember.js Grouping Results
body: <p>I'm trying to achieve a "group by" functionality in Ember.js and its proving more difficult than I originally thought.</p>
  
  <pre><code>[{date: '2014-01-15T16:22:16-08:00', message: 'Tidal wave occurred'},
  {date: '2014-01-15T05:00:16-08:00', message: 'Tornado destroyed town'},
  {date: '2014-01-13T14:22:16-08:00', message: 'Volcanic eruption, likely'},
  {date: '2014-01-13T16:24:16-08:00', message: 'Ice shelf calving off completely'},
  {date: '2014-01-11T11:27:26-08:00', message: 'Mother-in-law visiting'}]
  </code></pre>
  
  <p>I'm looking for final output similar to this:</p>
  
  <pre><code>Today
  ----------
  4:22 pm - Tidal wave occurred
  5:00 am - Tornado destroyed town
  
  Monday
  ----------
  2:22 pm - Volcanic eruption, likely
  ...etc., etc.
  </code></pre>
  
  <p>Right now this data is bound to an ArrayController. Each object has a computed property to get "year/month/day" for the grouping comparison.</p>
  
  <pre><code>var ActivityController = Em.ArrayController.extend({
  
      groupedResults: function () {
          var result = [];
  
          //Iterate over each item in the list, but do what with it?
          this.get('content').filter(function (item) {
  
          });
  
          return result;
      }.property('content.[]')
  
  });
  </code></pre>
  
  <p>Any tips on the best way to implement this? Ember ships with filterBy and mapBy, but no groupBy.</p>