Overall
SDKs
- Typescript
- @upstash/redis
- Overview
- Get Started
- Commands
- Overview
- Auth
- Bitmap
- Generic
- Hash
- Json
- List
- PubSub
- Scripts
- Server
- Set
- Sorted Set
- Stream
- String
- Transactions
- Deployment
- Pipeline
- Advanced
- Retries
- Troubleshooting
- Developing or Testing
- @upstash/query
- @upstash/vector
- @upstash/edge-flags
- @upstash/ratelimit
- @upstash/kafka
- @upstash/qstash
- Python
DevOps
- Terraform
- Pulumi
- CLI
Set
SMEMBERS
Return all the members of a set
Copy
await redis.sadd("set", "a", "b", "c");
const members = await redis.smembers("set");
console.log(members); // ["a", "b", "c"]
Was this page helpful?
Copy
await redis.sadd("set", "a", "b", "c");
const members = await redis.smembers("set");
console.log(members); // ["a", "b", "c"]
Assistant
Responses are generated using AI and may contain mistakes.