JSON.OBJKEYS key [path]
@json
,
@read
,
@slow
,
Return the keys in the object that's referenced by path
key
is key to parse. Returns null
for nonexistent keys.
path
is JSONPath to specify. Default is root $
. Returns null
for nonexistant path.
redis> JSON.SET doc $ '{"a":[3], "nested": {"a": {"b":2, "c": 1}}}'
OK
redis> JSON.OBJKEYS doc $..a
1) (nil)
2) 1) "b"
2) "c"
With $
-based path argument: Array reply of array replies of bulk string replies, where each nested array contains the key names in the object, or null
if the matching value is not an object.
With .
-based path argument: Array reply of bulk string replies containing the key names in the object, or null reply if the matching value is not an object.
JSON.ARRINDEX
| JSON.ARRINSERT