Report the type of JSON value at path
key
is key to parse.
path
is JSONPath to specify. Default is root $
. Returns null if the key
or path
do not exist.
JSON.TYPE returns an array of string replies for each path, specified as the value's type. For more information about replies, see Redis serialization protocol specification.
{{< highlight bash >}} redis> JSON.SET doc $ '{"a":2, "nested": {"a": true}, "foo": "bar"}' OK redis> JSON.TYPE doc $..foo
- "string" redis> JSON.TYPE doc $..a
- "integer"
- "boolean" redis> JSON.TYPE doc $..dummy (empty array) {{< / highlight >}}
JSON.SET
| JSON.ARRLEN