title: Immutable.js Map values to array
body: <p>I am using the immutable Map from <a href="http://facebook.github.io/immutable-js/docs/#/Map" rel="noreferrer">http://facebook.github.io/immutable-js/docs/#/Map</a></p>
  
  <p>I need to get an array of the values out to pass to a backend service and I think I am missing something basic, how do I do it ?</p>
  
  <p>I have tried : </p>
  
  <p><code>mymap.valueSeq().toArray()</code></p>
  
  <p>But I still get an immutable data structure back ?</p>
  
  <p>For example :</p>
  
  <pre><code>var d = '[{"address":"10.0.35.118","cpus":4}]';
  var sr = JSON.parse(d);
  var is = Immutable.fromJS(sr);
  
  console.log(sr);
  
  console.log(is.toArray());
  console.log(is.valueSeq().toArray());
  </code></pre>
  
  <p>See this <a href="http://jsfiddle.net/3sjq148f/2/" rel="noreferrer">http://jsfiddle.net/3sjq148f/2/</a> </p>
  
  <p>The array that we get back from the immutable data structure seems to still be adorned with the immutable fields for each contained object. Is that to be expected ?</p>