{
  "id": "json.del",
  "title": "JSON.DEL",
  "url": "https://redis.io/docs/latest/commands/json.del/",
  "summary": "Deletes a value",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-04-09T10:29:34-04:00",
  "page_type": "content",
  "content_hash": "73162d7140c7dc810b5e04985f29f79f8a7379e74a10bb54e70ac8c74e417c04",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "Delete a value\n\n[Examples](#examples)"
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary> \n\nis key to modify.\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>path</code></summary> \n\nis JSONPath to specify. Default is root `$`. Nonexisting paths are ignored.\n\n\n \nDeleting an object's root is equivalent to deleting the key from Redis.\n\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "<details open>\n<summary><b>Delete a value</b></summary>\n\nCreate a JSON document.\n\n\nredis> JSON.SET doc $ '{\"a\": 1, \"nested\": {\"a\": 2, \"b\": 3}}'\nOK\n\n\nDelete specified values.\n\n\nredis> JSON.DEL doc $..a\n(integer) 2\n\n\nGet the updated document.\n\n\nredis> JSON.GET doc $\n\"[{\\\"nested\\\":{\\\"b\\\":3}}]\"\n\n</details>"
    },
    {
      "id": "redis-software-and-redis-cloud-compatibility",
      "title": "Redis Software and Redis Cloud compatibility",
      "role": "content",
      "text": "| Redis<br />Software | Redis<br />Cloud | <span style=\"min-width: 9em; display: table-cell\">Notes</span> |\n|:----------------------|:-----------------|:------|\n| <span title=\"Supported\">&#x2705; Supported</span><br /> | <span title=\"Supported\">&#x2705; Flexible & Annual</span><br /><span title=\"Supported\">&#x2705; Free & Fixed</nobr></span> |  |"
    },
    {
      "id": "return-information",
      "title": "Return information",
      "role": "returns",
      "text": "**RESP2:**\n\n[Integer reply](): the number of paths deleted (0 or more).\n\n**RESP3:**\n\n[Integer reply](): the number of paths deleted (0 or more)."
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`JSON.SET`]() | [`JSON.ARRLEN`]()"
    },
    {
      "id": "related-topics",
      "title": "Related topics",
      "role": "related",
      "text": "* [RedisJSON]()\n* [Index and search JSON documents]()"
    }
  ],
  "examples": []
}
