code: function(items, key) {
        if (items.length && Array.isArray(items[0][key])) {
          return groupByArray(items, key);
        }
        return _.groupBy(items, key);
  
        function groupByArray(items, arrayName) {
          var results = {};
          _.each(items, function(item) {
            _.each(item[arrayName] || [], function(inner) {
              if (!results[inner]) {
                results[inner] = [];
              }
              results[inner].push(item);
            });
          });
  
          return results;
        }
  
      }
docs: Groups by the property named by 'key' on each of the values. If the property referred to by the string 'key' is found to be an array property of the first object, apos.utils.groupByArray is called.  Usage: {{ apos.utils.groupBy(people, 'age') }} or {{ apos.utils.groupBy(items, 'tags') }}