code: private void collapseMap(HashMap<String, Object> objMap) {
      while (objMap.keySet().size() == 1 && objMap.keySet().contains("")) {
        HashMap<String, Object> innerMap = (HashMap<String, Object>) objMap.get("");
        objMap.clear();
        objMap.putAll(innerMap);
      }
    }
docs: Condenses the main object map to eliminate unnecessary nesting and allow for proper type conversion when the map
  is complete.
  
  @param objMap Map used to build the structure for the resulting {@link QueryAggregation} object