{
  "id": "json.mget",
  "title": "JSON.MGET",
  "url": "https://redis.io/docs/latest/commands/json.mget/",
  "summary": "Returns the values at a path from one or more keys",
  "tags": [
    "docs",
    "develop",
    "stack",
    "oss",
    "rs",
    "rc",
    "oss",
    "kubernetes",
    "clients"
  ],
  "last_updated": "2026-04-09T10:29:34-04:00",
  "page_type": "content",
  "content_hash": "7b090d3708ad3d2be9359581f706fc478463d9805824e6f33b1f105132c09281",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "This command's behavior varies in clustered Redis environments. See the [multi-key operations]() page for more information.\n\n\n\nReturn the values at `path` from multiple `key` arguments\n\n\nWhen cluster mode is enabled, all specified keys must reside on the same [hash slot](https://redis.io/docs/latest/operate/oss_and_stack/reference/cluster-spec/#key-distribution-model).\n\nWhen the database has more than one shard, and the specified keys reside in different shards, Redis will not report a CROSSSLOT error (to avoid breaking changes) and the results may be partial.\n\n\n\n[Examples](#examples)"
    },
    {
      "id": "required-arguments",
      "title": "Required arguments",
      "role": "content",
      "text": "<details open><summary><code>key</code></summary> \n\nis key to parse. Returns `null` for nonexistent keys.\n</details>"
    },
    {
      "id": "optional-arguments",
      "title": "Optional arguments",
      "role": "parameters",
      "text": "<details open><summary><code>path</code></summary> \n\nis JSONPath to specify. Returns `null` for nonexistent paths.\n\n</details>"
    },
    {
      "id": "examples",
      "title": "Examples",
      "role": "example",
      "text": "<details open>\n<summary><b>Return the values at <code>path</code> from multiple <code>key</code> arguments</b></summary>\n\nCreate two JSON documents.\n\n\nredis> JSON.SET doc1 $ '{\"a\":1, \"b\": 2, \"nested\": {\"a\": 3}, \"c\": null}'\nOK\nredis> JSON.SET doc2 $ '{\"a\":4, \"b\": 5, \"nested\": {\"a\": 6}, \"c\": null}'\nOK\n\n\nGet values from all arguments in the documents.\n\n\nredis> JSON.MGET doc1 doc2 $..a\n1) \"[1,3]\"\n2) \"[4,6]\"\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[Array reply]() of [bulk string replies]() or [null replies](), where each element is the JSON serialization of the value at the corresponding key's path, or `null` if the key or path doesn't exist.\n\n**RESP3:**\n\n[Array reply]() of [bulk string replies]() or [null replies](), where each element is the JSON serialization of the value at the corresponding key's path, or `null` if the key or path doesn't exist."
    },
    {
      "id": "see-also",
      "title": "See also",
      "role": "related",
      "text": "[`JSON.SET`]() | [`JSON.GET`]()"
    },
    {
      "id": "related-topics",
      "title": "Related topics",
      "role": "related",
      "text": "* [RedisJSON]()\n* [Index and search JSON documents]()"
    }
  ],
  "examples": []
}
