The `_state` operator gets a value from the [`state`](/context-and-state) object. The `state` is a data object specific to the context it is in. The value of `input` blocks are available in `state`, with their `blockId` as key. By default, `_state` accesses the `state` object from the [`context`](/context-and-state) the operator is used in, but a different context can be specified.
If the `_state` operator is called with a string argument, the value of the key in the `state` object is returned. If the value is not found, `null` is returned. Dot notation and [block list indexes](/lists) are supported.
###### boolean
If the `_state` operator is called with boolean argument `true`, the entire `state` object is returned.
###### object
- `all: boolean`:If `all` is set to `true`, the entire `state` object is returned. One of `all` or `key` are required.
- `key: string`:The value of the key in the `state` object is returned. If the value is not found, `null`, or the specified default value is returned. Dot notation and [block list indexes](/lists) are supported. One of `all` or `key` are required.
- `default: any`:A value to return if the `key` is not found in `state`. By default, `null` is returned if a value is not found.
- `contextId: string`:The id of a `context`. Setting this will get the value from the `state` of the specified context. A list of `contexts` that exist are returned by the [`_list_contexts`](/_list_contexts) operator. Cannot be used in `connections` or `requests`.