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; }
```
```
 const result = [];

 for(const [index, key] of array1.entries()){
   for(const [userindex, value] of array2[index].entries()){
     if(!result[userindex])
       result[userindex] = {};
     result[userindex][key] = value; 
   }
}

```

You might go over every key and the values related to the key and assign every key/value pair to the resulting object at the position of the value.