This is what I use currently, I am sure there's a better looking solution
let colArray = columns.columns.map(col => col.name)
let transfromedData = []
rows.forEach(row => {
let temp = {};
colArray.forEach((key, i) => {
temp[key] = row[i];
})
transfromedData.push(temp)
})
const sortedColums = columns.columns.sort((a,b) => a.value - b.value).map(x=>x.name)
const output = rows.map(x => { const entry = {}; x.map((val, idx) => entry[sortedColums[idx]] = val); return entry})