public static @Nullable JsonObject findPropertiesObject(PsiElement element) {
    PsiElement parent = getParentSafe(getParentSafe(getParentSafe(element)));
    if (!(parent instanceof JsonObject)) return null;
    Optional<JsonProperty> propertiesProp =
      ((JsonObject)parent).getPropertyList().stream().filter(p -> "properties".equals(p.getName())).findFirst();
    if (propertiesProp.isPresent()) {
      JsonValue value = propertiesProp.get().getValue();
      if (value instanceof JsonObject) {
        return (JsonObject)value;
      }
    }
    return null;
  }
public static @Nullable JsonObject findPropertiesObject(PsiElement element)