await redis.zadd( "key1", { score: 1, member: "member1" }, ) await redis.zadd( "key2", { score: 1, member: "member1" }, { score: 2, member: "member2" }, ) const res = await redis.zunionstore("destination", 2, ["key1", "key2"]); console.log(res) // 2
Writes the union between sets to a new key.
The key to write the union to.
How many keys to compare.
The keys to compare.
The aggregation method.
The weight to apply to each key.
The weights to apply to each key.
The number of elements in the resulting set.
Was this page helpful?