title: How to update an object within an array with immutable.js
body: <p>I wish to update an objects  in an array using immutable.js</p>
  
  <p>My object looks like this:</p>
  
  <pre><code>{
      location: '',
      cars: [
        {id: 1, color: blue},
        { id: 2, color: red}
      ]
  };
  </code></pre>
  
  <p>In my code I get for example car id: 2 and change the color { id: 2, color: black}</p>
  
  <p>I now wish to update the car which is at  index 1 .</p>
  
  <p>I tried :</p>
  
  <pre><code>const car = { id: 2, color: black}
  updateIn([ 'cars'  ], list =&gt; list.push(car));
  </code></pre>
  
  <p>This will only add a new car at the end.</p>
  
  <p>Which function in Immutable JS can I use to update car id # 2.</p>
  
  <p>What’s  the correct way to do this with immutable.js</p>