Imagine having the following set of data:
{
A1: {name: "x", age: y},
B1: {name: "x", age: y},
C1: {name: "x", age: y},
D1: {name: "x", age: y},
A2: {name: "x", age: y},
B2: {name: "x", age: y},
C2: {name: "x", age: y},
D2: {name: "x", age: y},
A3: {name: "x", age: y},
B3: {name: "x", age: y},
C3: {name: "x", age: y},
D3: {name: "x", age: y},
}
The goal is to transform it into this structure:
[
{
A1: {name: "x", age: y},
B1: {name: "x", age: y},
C1: {name: "x", age: y},
D1: {name: "x", age: y},
},
{
A2: {name: "x", age: y},
B2: {name: "x", age: y},
C2: {name: "x", age: y},
D2: {name: "x", age: y},
},
{
A3: {name: "x", age: y},
B3: {name: "x", age: y},
C3: {name: "x", age: y},
D3: {name: "x", age: y},
}
]
Various attempts utilizing for loops and maps have been made, but achieving the desired outcome has proven challenging.