This is my array:
[
['x', 1],
['y', 2],
['z', 3],
['F', "_180"],
['x', 1],
['y', 2],
['z', 3],
['t', 4]
['F', "_360"],
['x', 1],
['y', 2],
['z', 3],
['t', 4],
['m', 5]
['F', "_480"],
]
This is what I want to achieve:
[{
profile_180: {
x: 1,
y: 2,
z: 3
}
}, {
profile_360: {
x: 1,
y: 2,
z: 3,
t: 4
}
}, {
profile_480: {
x: 1,
y: 2,
z: 3
t: 4,
m: 5
}
}]
How do I get this?