title: How do I iterate over a set to list all the keys?
body: <p>I'm trying to loop through all the keys in my set but not sure how this works.</p>
  
  <p>Say I have a set like this:</p>
  
  <pre><code>SADD myset "hello" "world"
  </code></pre>
  
  <p>My set now has 2 keys in it.</p>
  
  <p>How can I loop through and get all the values, or page through them?</p>
  
  <p>I tried this:</p>
  
  <pre><code>$redis.scan(0, match:"myset")
  </code></pre>
  
  <p>and I get this back:</p>
  
  <pre><code>2.3.3 :020 &gt; $redis.scan(0, match:"myset")
   =&gt; ["0", ["myset"]] 
  </code></pre>
  
  <p>I'm confused as to what to do with that result?</p>