- 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
Set
SMEMBERS
Return all the members of a set
await redis.sadd("set", "a", "b", "c");
const members = await redis.smembers("set");
console.log(members); // ["a", "b", "c"]
Arguments
The key of the set.
Response
The members of the set.
await redis.sadd("set", "a", "b", "c");
const members = await redis.smembers("set");
console.log(members); // ["a", "b", "c"]
Was this page helpful?
await redis.sadd("set", "a", "b", "c");
const members = await redis.smembers("set");
console.log(members); // ["a", "b", "c"]