title: Replacing an object in an object array in Redux Store using Javascript/Lodash
body: <p>I have an object array in a reducer that looks like this:</p>
  
  <pre><code>[
    {id:1, name:Mark, email:mark@email.com}, 
    {id:2, name:Paul, email:paul@gmail.com}, 
    {id:3,name:sally, email:sally@email.com} 
  ]
  </code></pre>
  
  <p>Below is my reducer. So far, I can add a new object to the <code>currentPeople</code> reducer via the following:</p>
  
  <pre><code>const INITIAL_STATE = { currentPeople:[]};
  
  export default function(state = INITIAL_STATE, action) {
    switch (action.type) {
      case ADD_PERSON:
        return {...state, currentPeople: [ ...state.currentPeople, action.payload]}; 
    }
    return state;
  }
  </code></pre>
  
  <p>But here is where I'm stuck. Can I UPDATE a person via the reducer using lodash?
  If I sent an action payload that looked like this:</p>
  
  <pre><code>  {id:1, name:Eric, email:Eric@email.com}
  </code></pre>
  
  <p>Would I be able to replace the object with the id of 1 with the new fields?</p>