I am having a hard time wrapping my head around how to do this. I have this object:
var objData = {
_Input_396__REPEAT15_374:["Bedroom2", "Bedroom3", "Bedroom4"],
_Input_396__REPEAT15_375:["1st", "2nd", "3rd"],
_Input_396__REPEAT15_376:["122", "133", "144"],
_Input_396__REPEAT15_377:["122", "133", "144"],
_Input_396__REPEAT15_378:["Bamboo", "FloorNone", "Cork"]
};
the length of each array will be the same as the others in the object, however the length will change, so a length of 3 wont always be the length.
I need to deconstruct into this:
var arrData = [
{
_Input_396__REPEAT15_374:"Bedroom2",
_Input_396__REPEAT15_375:"1st",
_Input_396__REPEAT15_376:"122",
_Input_396__REPEAT15_377:"122",
_Input_396__REPEAT15_378:"Bamboo"
},
{
_Input_396__REPEAT15_374:"Bedroom3",
_Input_396__REPEAT15_375:"2nd",
_Input_396__REPEAT15_376:"133",
_Input_396__REPEAT15_377:"133",
_Input_396__REPEAT15_378:"FloorNone"
},
{
_Input_396__REPEAT15_374:"Bedroom4",
_Input_396__REPEAT15_375:"3rd",
_Input_396__REPEAT15_376:"144",
_Input_396__REPEAT15_377:"144",
_Input_396__REPEAT15_378:"Cork"
}
];
What is the best way to achieve this?