title: Typescript map specific columns from an array
body: <p>I have an array of objects and I need a way to allow the user to select which properties they want to import in the database. Is there a way to map and create a separate array only with the properties the user actually wants to send insert.</p>
  <p>For example, if we have the following array:</p>
  <pre><code>[
      {name: 'name1', address: 'addr1', phone: '123'},
      {name: 'name2', address: 'addr1', phone: '123'},
      {name: 'name3', address: 'addr1', phone: '123'},
      {name: 'name4', address: 'addr1', phone: '123'},
  ]
  </code></pre>
  <p>and the user selects name and phone only, then the array that is sent to be added in the database should look like this:</p>
  <pre><code>[
          {name: 'name1', phone: '123'},
          {name: 'name2', phone: '123'},
          {name: 'name3', phone: '123'},
          {name: 'name4', phone: '123'},
      ]
  </code></pre>
  <p>How can this be achieved?</p>