Redis Advanced icon

Redis Advanced

Get, send and update data in Redis with enhanced operations

Set Add

AI-generated

Summary

Add one or more members to a Redis set identified by the given set name.

Inputs

  • Set (required) — Name of the Redis set to add members to.
  • Members (required) — Space-separated list of members to add to the set.

Output shape

a list of JSON objects, each containing the set name, number of members actually added, and the list of members attempted to add.

Each input item corresponds to one output item. The operation returns how many members were added excluding those already existing in the set.

Examples

Example 1: Add members 'member1', 'member2', and 'member3' to set 'mySet'.

Set: mySet; Members: member1 member2 member3

Discussion