key
callback
取得集合內的所有成員。
client.del('food'); const arr = ['apple', 'potato', 'apple', 'onion', 'potato', 'onion'] client.sadd('food', arr); client.smembers('food', (err, members) => { console.log(members); });
[ 'apple', 'onion', 'potato' ]
Last updated 3 years ago
Was this helpful?