title: Updating a nested array in reducer in Redux
body: <p>I am trying to update a particular index in an array of objects in reducer. The state has an array of objects. isSearch is a property of the object. In the payload of action I am passing the index to be updated and the value. This is my code:</p>
  
  <pre><code>case actions.UPDATE:
    return {
      ...state,
      arrObj: {
        ...state.arrObj,
        arrObj[action.payload.index].isSearch : action.payload.isSearch,
      },
    };
  </code></pre>
  
  <p>I get this error <code>Unexpected token, expected , at arrObj[action.payload.index].</code> Could someone tell me how can I correct this?</p>