Construct new array of objects from object array : <p>I have this array of objects from an api, containing latitude and longitude I need to store to another array of objects.</p>

<pre><code>response: [
  {
    title: "Map marker 1",
    lat: 10.0,
    lng: 10.0
  },
  {
    title: "Map marker 2",
    lat: 11.0,
    lng: 11.0
  }
]
</code></pre>

<p>What's the preferred way to get <code>lat</code> and <code>lng</code> values and store them to a new object array with the following structure?</p>

<pre><code>markers: [
   {
     position: {lat: 10.0, lng: 10.0}
   }, 
   {
     position: {lat: 11.0, lng: 11.0}
   }
]
</code></pre>
