code: function getObsValue(item, loadedDimensions, dimensionIndices, dataSets) {
    // Usually no dimensions need to be aggregated, so just return dataSets[key].obsValue.
    var key = dimensionIndices.join(":");
    var valueObject = dataSets[key];
    if (item.aggregatedDimensionIds.length === 0) {
      return defined(valueObject) ? valueObject.obsValue : null;
    }
    // This implementation can handle at most a single aggregated dimension id.
    if (item.aggregatedDimensionIds.length === 1) {
      var aggregatedDimensionId = item.aggregatedDimensionIds[0];
      var valuesToAggregate = [];
      var aggregatedDimensionIndex = getDimensionIndexById(
        loadedDimensions,
        aggregatedDimensionId
      );
      var dimension = getDimensionById(loadedDimensions, aggregatedDimensionId);
      if (!defined(dimension)) {
        console.warn(
          "Tried to aggregate on a dimension that doesn't exist, " +
            aggregatedDimensionId
        );
        return defined(valueObject) ? valueObject.obsValue : null;
      }
      dimension.values.forEach(function(thisValueObject) {
        dimensionIndices[aggregatedDimensionIndex] = thisValueObject.id;
        var thisKey = dimensionIndices.join(":");
        thisValueObject = dataSets[thisKey];
        if (defined(thisValueObject)) {
          valuesToAggregate.push(thisValueObject.obsValue);
        }
      });
      return sumArray(valuesToAggregate);
    }
    console.warn(
      "SDMX-JSON aggregatedDimensionIds - only a single dimension id is implemented."
    );
  }
docs: Slightly generalise dataSets[key].obsValue to handle undefined data, and the possibility of aggregating across some dimensions.