code: function(map, key, row){
          var k, v, p, i, len = key.length, last = len - 1, m = map;
          for (i = 0; i < len; i++){
              k = key[i]; //get the keypart
              v = row[k]; //get the value for the key part
              p = m[v];   //get the property from the map for this keypart.
              if (p) {
                  if (i === last) {   //last, we need to store the row now.
                      if (_isArr(p)) p.push(row); //already entries here, append
                      else m[v] = [p, row]; //single row store here. since we need multiple rows, add an array
                  }
                  else m = p;
              }
              else                        //property didnt exist for this key yet.
              if (i === last) m[v] = row; //last keypart: store the row here
              else m = m[v] = {};         //more keyparts to go: add a new map for this keypart
          }
      }
docs: Fetch all row as an object, store it in nested objects according to values in the column identified by the key argument.
  This method should typically not be called directly, rather it is a helper method for <code><a href="#method_mapAllAsObject">mapAllAsObject()</a></code>.
  
  @method mapAsObject
  @param map
  @param key
  @param row
  @return {object} a tree using column values as branch names, and storing a row or an array of rows at the leaves.