> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-fix-issues-on-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# JSON.CLEAR

> Clear container values (arrays/objects) and set numeric values to 0.

## Arguments

<ParamField body="key" type="str" required>
  The key of the json entry.
</ParamField>

<ParamField body="path" type="str" default="$">
  The path to clear
</ParamField>

## Response

<ResponseField type="int" required>
  The length of the array after the appending.
</ResponseField>

<RequestExample>
  ```py Example
  redis.json.clear("key")
  ```

  ```py With path
  redis.json.clear("key", "$.my.key")
  ```
</RequestExample>
