function split(object, size) {
      var arr = [];
      var i = 0;
      angular.forEach(object, function(value, key){
        var index = i++ % size;
        if (!arr[index]){
          arr[index] = {};
        }
        arr[index][key] = value;
      });
      return arr;
    }
Splits an object into an array multiple objects inside.

@param object source object
@param size size of array

@return array of splitted objects