title: Not able to update the array of objects where there is another array inside the same object
body: <pre><code>&quot;departureList&quot;: [
      { 
          &quot;fixDiscount&quot;:5.0,
          &quot;endDate&quot;:&quot;2021-08-25&quot;,
          &quot;seatLeft&quot;:20,
          &quot;addOn&quot;:[
              {
                  &quot;unit&quot;:1,
                  &quot;price&quot;:33.0,
                  &quot;name&quot;:&quot;addone 1&quot;,
                  &quot;addonId&quot;:&quot;5e826530-33c1-4300-ac0d-5ca85b2b2dbc&quot;
              }
          ],
          &quot;totalPeople&quot;:1,
          &quot;cartId&quot;:&quot;ebc40f12-8963-49c8-b624-173a4f1d0d39&quot;,
          &quot;departureCartId&quot;:&quot;84005195-e09a-46df-99a6-3d92a42c3b8f&quot;,
      }
  ]
  </code></pre>
  <p>I have array of objects inside departurelist. Inside that i have another array of objects names addOn. I can change departure list data and update
  like :</p>
  <pre><code>  export const departureDatasChange = (departureData) =&gt; {
       async (dispatch, getState) =&gt; {
         const { getCartData } = getState().cart;
  
      let departureList = getCartData.departureList;
     departureList = departureList.map((item) =&gt; {
      return item.departureCartId === departureData.departureCartId
       ? departureData
       : item;
      });
  </code></pre>
  <p>but I am not able to change the addon data and map to the same departure list object.</p>