I have data like this:
var data = {
value1: ["a", "b", "c"],
value2: [1, 2, 3]
}
I want to convert it to:
var newData = [
{value1: "a", value2: 1},
{value1: "b", value2: 2},
{value1: "c", value2: 3}
]
How can I achieve this with javascript?
value1, and push little objects made from the value fromvalue1and the value fromvalue2at the same index onto an array.value1andvalue2fixed?