I'm creating objects in a forEach loop. I'm attempting to count the number of tweets on a given day, add those values up for that day, and push the day/count object back onto an array.

My desired result is something like this:

```
[
  { 
    "date": "April 5th", 
    "tweets": 12
  },
  { 
    "date": "April 4th", 
    "tweets": 20
  }
]

```

The code I have:

```
App.TweetsController = Ember.ArrayController.extend({
  tweetFrequencies: function() {
    var self = this;
    var model = self.get('model');
    var tweetsHash = {};
    var tweetsArray = [];

    model.forEach(function(item) {

      var tweetFreq = {};
      var normalizedDate = moment(item.created_at).format( 'MMMM Do' );

      if ( tweetsHash[normalizedDate] === undefined ) {
        tweetsHash[normalizedDate] = { "Date": normalizedDate, "Tweets": 1 };
      } else {
        tweetsHash[normalizedDate]["Tweets"] += 1;
      }

      tweetFreq['tdate'] = tweetsHash[normalizedDate]["Date"];
      tweetFreq['tweets'] = tweetsHash[normalizedDate]["Tweets"];
      tweetsArray.push( tweetFreq );

    });

    return tweetsArray;

  }.property('model')
});

```

Edit:

![Data I'm getting back](https://i.stack.imgur.com/PH0k8.png)