code: private void setAggregatedValuesInResult(List results, CouchDBQueryInterpreter interpreter, JsonArray array)
      {
          for (JsonElement json : array)
          {
              JsonElement value = json.getAsJsonObject().get("value");
              if (interpreter.getAggregationType().equals(CouchDBConstants.COUNT))
                  results.add(value.getAsInt());
              else
                  results.add(value.getAsDouble());
          }
      }
docs: Sets the aggregated values in result.
  
  @param results
  the results
  @param interpreter
  the interpreter
  @param array
  the array