SMEMBERS

Syntax

  1. SMEMBERS key

Time complexity: O(N) where N is the set cardinality.

Returns all the members of the set value stored at key.

This has the same effect as running SINTER with one argument key.

Return

Array reply: all elements of the set.

Examples

  1. dragonfly> SADD myset "Hello"
  2. (integer) 1
  3. dragonfly> SADD myset "World"
  4. (integer) 1
  5. dragonfly> SMEMBERS myset
  6. 1) "Hello"
  7. 2) "World"