- Overall
- Quickstarts
- Features
- SDKs
- Typescript
- Overview
- Get Started
- Commands
- Overview
- Auth
- Bitmap
- Generic
- Hash
- Json
- List
- PubSub
- Scripts
- Server
- Set
- Sorted Set
- Stream
- String
- Transactions
- Deployment
- Pipelining
- Advanced
- Retries
- Troubleshooting
- Developing or Testing
- Python
- Ratelimit (TS)
- Ratelimit (PY)
- How To
- Integrations
- Tutorials
- Troubleshooting
- Help
Hash
HKEYS
Return all field names in the hash stored at key.
await redis.hset("key", {
id: 1,
username: "chronark",
});
const fields = await redis.hkeys("key");
console.log(fields); // ["id", "username"]
Arguments
The key of the hash.
Response
The field names of the hash
await redis.hset("key", {
id: 1,
username: "chronark",
});
const fields = await redis.hkeys("key");
console.log(fields); // ["id", "username"]
Was this page helpful?
await redis.hset("key", {
id: 1,
username: "chronark",
});
const fields = await redis.hkeys("key");
console.log(fields); // ["id", "username"]