code: public Optional<JsonObject> findFirstWithFieldValue(@Nonnull String fieldName, String value) {
          JsonElement result = findFirstMatching(e -> {
              if(!e.isObject()) {
                  return false;
              }
              JsonObject object = e.asObject();
              String fieldValue = object.getString(fieldName);
              if(fieldValue !=null) {
                  return fieldValue.equals(value);
              } else {
                  return false;
              }
          }).orElse(null);
          if(result != null) {
              return Optional.of(result.asObject());
          } else {
              return Optional.empty();
          }
      }
docs: Allows you to lookup objects from an array by e.g. their id.
  @param fieldName field to match on
  @param value value of the field
  @return the first object where field == value, or null