title: How do I perform map of array in Javascript while transforming one part of return object?
body: <p>I have a React component which is performing a get operation of a JSON and returning an array with this format of object:</p>
  
  <pre><code>{
  device_id: "5c07f86f-3763-477f-81a7-558395a9252e"
  device_type: "MX480"
  domain: "JUNIPER"
  domain_id: "5c07f843-7e67-4ce1-bf91-d0d7b04f35f6"
  resources: null
  sync_status: "idle"
  sync_time: "2018-12-10T19:18:20+00:00"
  }
  </code></pre>
  
  <p>What I need to do is transform the <code>sync_time</code> in each returned object to a date/time format which I have successfully converted using the following:</p>
  
  <pre><code>const finalSyncDates = names.map(item =&gt; new Date(item.sync_time))
  .map(n =&gt; n.toLocaleString());  
  </code></pre>
  
  <p>But I still need the rest of the object. Ultimately I want to output:</p>
  
  <pre><code>{
  device_id: "5c07f86f-3763-477f-81a7-558395a9252e"
  device_type: "MX480"
  domain: "JUNIPER"
  domain_id: "5c07f843-7e67-4ce1-bf91-d0d7b04f35f6"
  resources: null
  sync_status: "idle"
  sync_time: "CONVERTED SYNC TIME HERE"
  }
  </code></pre>
  
  <p>Just not sure of the syntax. Any help would be appreciated.</p>