Arguments
string
required
The key of the set to move the member from.
string
required
The key of the set to move the member to.
TMember
The members to move
Response
1 if the member was moved, 0 if not.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
await redis.sadd("original", "a", "b", "c");
const moved = await redis.smove("original", "destination", "a");
// moved: 1
// original: ["b", "c"]
// destination: ["a"]
Move a member from one set to another
1 if the member was moved, 0 if not.await redis.sadd("original", "a", "b", "c");
const moved = await redis.smove("original", "destination", "a");
// moved: 1
// original: ["b", "c"]
// destination: ["a"]
Was this page helpful?