# JSON.GET
Return the value at `path` in JSON serialized form
[Examples](#examples)
## Required arguments
key
is key to parse.
## Optional arguments
path
is JSONPath to specify. Default is root `$`. JSON.GET accepts multiple `path` arguments.
When using a single JSONPath, the root of the matching values is a JSON string with a top-level **array** of serialized JSON value.
In contrast, a legacy path returns a single value.
When using multiple JSONPath arguments, the root of the matching values is a JSON string with a top-level **object**, with each object value being a top-level array of serialized JSON value.
In contrast, if all paths are legacy paths, each object value is a single serialized JSON value.
If there are multiple paths that include both legacy path and JSONPath, the returned value conforms to the JSONPath version (an array of values).
INDENT
sets the indentation string for nested levels.
NEWLINE
sets the string that's printed at the end of each line.
SPACE
sets the string that's put between a key and a value.
Produce pretty-formatted JSON with `redis-cli` by following this example:
~/$ redis-cli --raw
redis> JSON.GET myjsonkey INDENT "\t" NEWLINE "\n" SPACE " " path.to.value[1]
## Return
JSON.GET returns a bulk string representing a JSON array of string replies.
Each string is the JSON serialization of each JSON value that matches a path.
Using multiple paths, JSON.GET returns a bulk string representing a JSON object with string values.
Each string value is an array of the JSON serialization of each JSON value that matches a path.
For more information about replies, see [Redis serialization protocol specification](https://redis.io/docs/latest/develop/reference/protocol-spec).
## Examples
Return the value at path
in JSON serialized form
Create a JSON document.
redis> JSON.SET doc $ '{"a":2, "b": 3, "nested": {"a": 4, "b": null}}'
OK
With a single JSONPath (JSON array bulk string):
redis> JSON.GET doc $..b
"[3,null]"
Using multiple paths with at least one JSONPath returns a JSON string with a top-level object with an array of JSON values per path:
redis> JSON.GET doc ..a $..b
"{\"$..b\":[3,null],\"..a\":[2,4]}"
## See also
[`JSON.SET`](https://redis.io/docs/latestcommands/json.set/) | [`JSON.MGET`](https://redis.io/docs/latestcommands/json.mget/)
## Related topics
* [RedisJSON](https://redis.io/docs/latest/develop/data-types/json/)
* [Index and search JSON documents](https://redis.io/docs/latest/develop/ai/search-and-query/indexing/)