SMISMEMBER key member
Available since
Time complexity
O(N) where N is the number of elements being checked for membership
ACL categories
@read, @set, @fast

Returns whether each member is a member of the set stored at key.

For every member, 1 is returned if the value is a member of the set, or 0 if the element is not a member of the set or if key does not exist.

Examples #

SADD myset "one"
SADD myset "one"
SMISMEMBER myset "one" "notamember"

Redict logo courtesy of @janWilejan, CC-BY-SA-4.0. Download SVG ⤑

Portions of this website courtesy of Salvatore Sanfilippo, CC-BY-SA-4.0.