code: private void parseArray(JsonReader in, HashMap<String, Object> objMap, String name) throws IOException {
      List<HashMap<String, Object>> array = new ArrayList<>();
      in.beginArray();
  
      while (in.peek() != JsonToken.END_ARRAY) {
        HashMap<String, Object> arrayItem = new HashMap<>();
        parseNext(in, arrayItem);
        array.add(arrayItem);
      }
  
      in.endArray();
      objMap.put(name, array);
    }
docs: Parses a JSON array and adds it to the main object map.
  
  @param in {@link JsonReader} object used for parsing
  @param objMap Map used to build the structure for the resulting {@link QueryAggregation} object
  @param name key value to go with the resulting value of this method pass
  @throws IOException signals that there has been an IO exception