code: function processGroup(_records, _target, _params) {
  
      // extract targets
      var targets = [], record;
      for(var i = 0, l = _records.length; i < l; i++) {
        record = _records[i][_target];
        if(angular.isArray(record)) {
          targets.push.apply(targets, record);
        } else if(record) {
          targets.push(record);
        }
      }
  
      // populate targets
      if(targets.length > 0) {
        var promise = typeof targets[0].$type.$populate === 'function' ?
          targets[0].$type.$populate(targets, _params).$asPromise() :
          populate(targets, _params);
  
        if(promise) {
          return promise.then(function() {
            return targets;
          });
        }
      }
  
      return $q.when(targets);
    }
docs: processes a group records of the same type