- 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
HGETALL
Retrieves all fields from a hash.
await redis.hset("key", {
field1: "value1",
field2: "value2",
});
const hash = await redis.hgetall("key");
console.log(hash); // { field1: "value1", field2: "value2" }
Arguments
The key to get.
Response
An object with all fields in the hash.
await redis.hset("key", {
field1: "value1",
field2: "value2",
});
const hash = await redis.hgetall("key");
console.log(hash); // { field1: "value1", field2: "value2" }
Was this page helpful?
await redis.hset("key", {
field1: "value1",
field2: "value2",
});
const hash = await redis.hgetall("key");
console.log(hash); // { field1: "value1", field2: "value2" }