# JSON.STRLEN
Report the length of the JSON String at `path` in `key`
[Examples](#examples)
## Required arguments
key
is key to parse.
## Optional arguments
path
is JSONPath to specify. Default is root `$`, if not provided. Returns null if the `key` or `path` do not exist.
## Return
JSON.STRLEN returns by recursive descent an array of integer replies for each path, the string's length, or `nil`, if the matching JSON value is not a string.
For more information about replies, see [Redis serialization protocol specification](https://redis.io/docs/latest/develop/reference/protocol-spec).
## Examples
redis> JSON.SET doc $ '{"a":"foo", "nested": {"a": "hello"}, "nested2": {"a": 31}}'
OK
redis> JSON.STRLEN doc $..a
1) (integer) 3
2) (integer) 5
3) (nil)
## See also
[`JSON.ARRLEN`](https://redis.io/docs/latestcommands/json.arrlen/) | [`JSON.ARRINSERT`](https://redis.io/docs/latestcommands/json.arrinsert/)
## Related topics
* [RedisJSON](https://redis.io/docs/latest/develop/data-types/json/)
* [Index and search JSON documents](https://redis.io/docs/latest/develop/interact/search-and-query/indexing/)