Skip to main content
Add one or more members to a set stored at key. Members that already exist in the set are ignored. If the key does not exist, a new set is created.

Usage

Parameters

key
string
required
The key of the set
member
TData
required
The first member to add to the set
members
TData[]
Additional members to add to the set

Response

result
number
The number of elements that were added to the set, not including elements already present

Examples

Add a single member

Add multiple members

Add duplicate members

Using with custom types