Arguments
The key to write the intersection to.
How many keys to compare.
keys
string | string[]
required
The keys to compare.
The weight to apply to each key.
The weights to apply to each key.
Response
The number of elements in the resulting set.
await redis.zadd(
"key1",
{ score: 1, member: "member1" },
)
await redis.zadd(
"key2",
{ score: 1, member: "member1" },
{ score: 2, member: "member2" },
)
const res = await redis.zinterstore("destination", 2, ["key1", "key2"]);
console.log(res) // 1