Question: I'm new to StackOverflow and I know this post might possibly be a duplicate of another so please spare me with all the downvotes and if you think there's an answer to my question out there, please post it and I'll delete this question. Thanks for understanding.

```
var array1 = ["name", "title", "desc"]
var array2 = [["name1", "name2"], ["title1", "title2"],["desc1", "desc2"]]

```

How will I turn these into:

```
[
 {name: "name1", title: "title1", desc: "desc1"},
 {name: "name2", title: "title2", desc: "desc2"}
]

```

Answer: 
You can use [`Array#map`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map), [`Object.assign`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign) (with [spread syntax](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_syntax)) and the ES6 [computed property](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Object_initializer#Computed_property_names) syntax to achieve that:

```js
const array1 = ["name", "title", "desc"],
    array2 = [["name1", "name2"], ["title1", "title2"],["desc1", "desc2"]];

const result = array2[0].map( (_, j) =>
    Object.assign(...array1.map( (key, i) => ({ [key]: array2[i][j] }) ))
);

console.log(result);
```

```css
.as-console-wrapper { max-height: 100% !important; top: 0; }
```
You can use this way also:

```js
var array1 = ["name", "title", "desc"];
var array2 = [["name1", "name2"], ["title1", "title2"],["desc1", "desc2"]];
var res = [];
for(var i=0; i<array2[0].length; i++){
  var obj = {};
  for(var j=0; j<array1.length; j++){
    var key = array1[j];
    var value = array2[j][i];
    obj[key] = value;
  }
  res.push(obj);
}
console.log(res);
```