Docs menu · Reference

Deletes the root path $ to remove the whole document, or a nested path to remove one field or array element. Missing documents and paths produce a no-op delete acknowledgement rather than an error.

Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.

Examples

Delete a document.

CLI

$ strata json set temp $ {"x":1}
$ strata json delete temp $
$ strata json exists temp

Wire

{"key":"temp","path":"$","type":"json_set","value":{"x":1}}
{"key":"temp","path":"$","type":"json_delete"}
{"key":"temp","type":"json_exists"}

Parameters

NameTypeRequiredDescription
keystringyesDocument key.
pathstringyesJSON path.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

MutationAck<JsonDelete>.

Errors

Invocation

  • CLI: strata json delete
  • Wire type: json_delete

agents: this page as markdown → /docs/reference/json/delete.md