remove

suspend fun <T> remove(formSchema: Schema<T>, formValue: T, path: Path)(source)
suspend fun <T> remove(formSchema: Schema<T>, formValue: T, path: String)(source)

Removes the values matching path that are part of the form value formValue (with schema formSchema) from their parent collection(s).

It is possible to clear a collection by providing a path with a trailing wildcard.

Removing the value on a path with a trailing recursive wildcard is considered equivalent to removing the value on said path without such wildcard. E.g. removing the value at "/x/∗∗" is equivalent to removing the value at "/x".

Throws

If path matches no schema paths, when attempting to remove the root value, or when a parent of path is not a collection.