title: updating all elments in an array
body: <p>I have to update all the elements in an array using Immutablejs</p>
  
  <p>The JSON looks like this :</p>
  
  <pre><code>imState = Immutable.fromJS({
    app: {
      line: {
        name: "Bar Chart",
        series: [
          {
            name: "Series1x",
            color: "#82ca9d"
          },
          {
            name: "Series2x",
            color: "#2239ca"
          },
          {
            name: "Series3x",
            color: "#c2a5ca"
          }
        ]
      }
    }
  })
  </code></pre>
  
  <p>And I would simply like to iterate over all the series elements and change the color to a fixed color "#1bf115".</p>
  
  <p>I am guessing you would use the <strong>update</strong> function. There is no API documentation on this function so I have been doing a lot of trial an error.</p>
  
  <p>I tried to use it like this :</p>
  
  <pre><code>imState = imState.update(
    ['app', 'line', 'series'],
    series =&gt; series.map(s =&gt; s.update('color', color =&gt; "#1bf115"))
  )
  </code></pre>
  
  <p>However I get an undefined error at <strong>series.map</strong>.</p>
  
  <p>Why is this wrong?</p>