title: Array manipulation/mapping returning undefined
body: <p>I'm trying to reorganise/restructure my data to send back to the api. I am mapping values into their respective new properties.</p>
  
  <p>Incoming prop:</p>
  
  <pre><code>const data = [
    {
      otherProperty: "string",
      otherPropertyTwo: "string",
      personId: "1269",
      peopleGroups: [
        { group: "SENIORS", groupStatus: "paid" },
        { group: "Infants", groupStatus: "not_paid" }
      ]
    }
  ];
  </code></pre>
  
  <p>and need to restructure into this whilst not leaving in any other properties other than the ones below:</p>
  
  <pre><code> const statusArrayUpdate = [{
       "personid": "1269",
       "groups": [
         {
           "group": "seniors",
           "status": "paid"
         },
      {
           "group": "Infants",
           "status": "not_paid"
         }
       ]
     }]
  </code></pre>
  
  <p>I tried this but getting undefined on the 2nd mapping, groups property...</p>
  
  <pre><code>const statusArrayUpdate = data.map(d =&gt; ({ ...d, personId: d.personId, groups: d.peopleGroups.map(s =&gt; [group: s.group, status: s.groupStatus]) }));
  </code></pre>