docs: function sn_api_datum_aggregateNestedDataLayers(layerData, resultKey, copyProperties, sumProperties, staticProperties) {
      var layerCount = layerData.length, dataLength, i, j, k, copyPropLength = copyProperties.length, sumPropLength = sumProperties.length, d, val, clone, array;
      dataLength = layerData[0].values.length;
      if (dataLength > 0) {
        array = [];
        for (i = 0; i < dataLength; i += 1) {
          d = layerData[0].values[i];
          clone = {};
          if (staticProperties !== undefined) {
            for (val in staticProperties) {
              if (staticProperties.hasOwnProperty(val)) {
                clone[val] = staticProperties[val];
              }
            }
          }
          for (k = 0; k < copyPropLength; k += 1) {
            clone[copyProperties[k]] = d[copyProperties[k]];
          }
          for (k = 0; k < sumPropLength; k += 1) {
            clone[sumProperties[k]] = 0;
          }
          for (j = 0; j < layerCount; j += 1) {
            for (k = 0; k < sumPropLength; k += 1) {
              val = layerData[j].values[i][sumProperties[k]];
              if (val !== undefined) {
                clone[sumProperties[k]] += val;
              }
            }
          }
          array.push(clone);
        }
        layerData = [ {
          key: resultKey,
          values: array
        } ];
      }
      return layerData;
    }