docs: public static HashMap<String, JSONObject> flatRessources(JSONObject object) throws JSONException {
          HashMap<String, JSONObject> result = new HashMap<String, JSONObject>();
  
          // no cycle in hierarchies!!
          if (object.has("resourceId") && object.has("childShapes")) {
              result.put(object.getString("resourceId"),
                         object);
              JSONArray childShapes = object.getJSONArray("childShapes");
              for (int i = 0; i < childShapes.length(); i++) {
                  result.putAll(flatRessources(childShapes.getJSONObject(i)));
              }
          }
          ;
  
          return result;
      }