title: Angularfire: How to push an object into another object in a $firebaseArray?
body: <p>I have this object in firebase:</p>
  
  <pre><code>Groups
      -id1
      name: a
  
      -id2
      name: b
  
      -id3
      name: c
  </code></pre>
  
  <p>I use "Groups" this way:</p>
  
  <pre><code>var ref = new Firebase("https://app.firebaseio.com/Groups");
  $scope.groups = $firebaseArray(ref)
  
  $scope.groups.$add({
      "name": "d"
      }).then(function (ref)
      {
          console.log('Added group');
      }, function (error)
      {
          console.error("Error:", error);
      });
  </code></pre>
  
  <p>Some of these groups contain items. How do I add an array and push some items in it? How to handle the case where the array already exists?</p>
  
  <p>This doesn't work:</p>
  
  <pre><code>var group = Groups.$getRecord(id3)
  if(!group.hasOwnProperty('items')){
      group['items'] = []
  }
  group['items'].push({item: "an item"})
  </code></pre>