addToSet
The addToSet
method adds an element to a set stored under the specified key.
Parameters
- key :
string
- the key for the set to which the element is added. - member :
string
- the element that needs to be added to the set.
Return Value
Promise<number>
The return type is a response that is a number representing the count of elements added to the set.
Example Request
const result = await addToSet('mySetKey', 'memberToRemove')