title: 2 Array combine into one array javascript
body: <p>Here is two array one is firstName another is lastName</p>
  <pre><code>{
    firstName: ['name1', 'name2'],
    lastName: ['last1', 'last2'],
  }
  </code></pre>
  <p>but I want to formate the data into one array like this.</p>
  <pre><code>{
    &quot;name&quot;: [{
        &quot;firstName&quot;: &quot;name1&quot;,
        &quot;lastName&quot;: &quot;last1&quot;
      },
      {
        &quot;firstName&quot;: &quot;name2&quot;,
        &quot;lastName&quot;: &quot;last2&quot;
      },
  
    ]
  }
  </code></pre>