Yaay, (sort of) Solved it, I still hope to get rid of the index, but this is enough, I can address the object name.
var name = ["Data","Shutter","Speed"];
var data = [10, 12, 30000];
var result = []; //somewhere to store new objects
let newRow = {}; //new empty object
for (let i = 0; i < data.length ; i++){
newRow[name[i]] = data[i];
}
result.push(newRow); //add new object to result array
msg.payload = result;
return msg;
