Docs menu · Reference

Returns a boolean status for one JSON document key without loading the stored document.

Status commands return a scalar or compact status payload and do not mutate database state.

Examples

Check whether a document exists.

CLI

$ strata json set user $ {"name":"alice"}
$ strata json exists user
$ strata json exists absent

Wire

{"key":"user","path":"$","type":"json_set","value":{"name":"alice"}}
{"key":"user","type":"json_exists"}
{"key":"absent","type":"json_exists"}

Parameters

NameTypeRequiredDescription
keystringyesDocument key.

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

Returns

StatusValue<bool>.

Errors

Invocation

  • CLI: strata json exists
  • Wire type: json_exists

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