# JSON.OBJKEYS
Return the keys in the object that's referenced by `path`
[Examples](#examples)
## Required arguments
key
is key to parse. Returns `null` for nonexistent keys.
## Optional arguments
path
is JSONPath to specify. Default is root `$`. Returns `null` for nonexistant path.
## Return
JSON.OBJKEYS returns an array of array replies for each path, an array of the key names in the object as a bulk string reply, or `nil` if the matching JSON value is not an object.
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":[3], "nested": {"a": {"b":2, "c": 1}}}'
OK
redis> JSON.OBJKEYS doc $..a
1) (nil)
2) 1) "b"
2) "c"
## See also
[`JSON.ARRINDEX`](https://redis.io/docs/latestcommands/json.arrindex/) | [`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/)