title: JavaScript: merge multiple object arrays by index
body: <p>I wanted to merge multi-array of objects below</p>
  <p><code>[{&quot;genderid&quot;:1515},{&quot;genderid&quot;:1516},{&quot;genderid&quot;:1513}]</code></p>
  <p><code>[{&quot;modnameid&quot;:1515},{&quot;modnameid&quot;:1516},{&quot;modnameid&quot;:1514}]</code></p>
  <p>to the desired output below</p>
  <pre><code>[
    {&quot;genderid&quot;:1515,&quot;modnameid&quot;:1515},
    {&quot;genderid&quot;:1516,&quot;modnameid&quot;:1516},
    {&quot;genderid&quot;:1513,&quot;modnameid&quot;:1514}
  ]
  </code></pre>