docs: public Object queryFrom(Object document) throws JSONPointerException {
          if (this.refTokens.isEmpty()) {
              return document;
          }
          Object current = document;
          for (String token : this.refTokens) {
              if (current instanceof JSONObject) {
                  current = ((JSONObject) current).opt(unescape(token));
              } else if (current instanceof JSONArray) {
                  current = readByIndexToken(current, token);
              } else {
                  throw new JSONPointerException(format(
                          "value [%s] is not an array or object therefore its key %s cannot be resolved", current,
                          token));
              }
          }
          return current;
      }