SMISMEMBER

SMISMEMBER key member [member ...]

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.

Return value

Array reply: list representing the membership of the given elements, in the same order as they are requested.

Examples

redis> SADD myset "one" (integer) 1 redis> SADD myset "one" (integer) 0 redis> SMISMEMBER myset "one" "notamember" 1) (integer) 1 2) (integer) 0

© 2009–2020 Salvatore Sanfilippo
Licensed under the Creative Commons Attribution-ShareAlike License 4.0.
https://redis.io/commands/smismember