title: How to convert SET to array in APEX?
body: <p>I have map with key and value and my goal is to get list of 'key'.
  I am thinking to get it to the array or List.
  Got to the point where I have key values in the SET but haven't figure out
  how to convert to the array.</p>
  
  <p>below is my code:</p>
  
  <pre><code>Map&lt;String, String&gt; mmm = new Map&lt;String, String&gt;();
  mmm.put('one', 'oneee');
  mmm.put('two', 'twooo');
  mmm.put('three', 'threeee');
  mmm.put('four', 'fourff');
  
  //outputs values in the map
  system.debug('=======values()==========&gt;' + mmm.values());
  //outputs key in the map
  system.debug('=======keyset()===========&gt;' + mmm.keyset());
  
  //get keys in the type SET
  SET&lt;string&gt; s = mmm.keyset();
  //returns 4
  system.debug('------------------------------------' + s.size());
  
  s.arrayTo() //this method does not exist :(
  </code></pre>