TYPE
Since 1.1.0Keys
Syntax
TYPE keyReturns the type of the value at key.
Reply
A simple string, one of:
| Type | Value |
|---|---|
string | a string |
list | a list |
set | a set |
zset | a sorted set |
hash | a hash |
stream | a stream |
ReJSON-RL | a JSON document, the name Redis's JSON module uses |
none | no such key |
Examples
> SET a 1
OK
> TYPE a
string
> JSON.SET j $ 1
OK
> TYPE j
ReJSON-RL
> TYPE missing
none