As a newcomer to development, I am looking to group similar objects within an array of JSON objects. Here is an example of my JSON array:
var data = [
{
zone: "Bottom",
group: "Bottom girders",
original: 7,
gauge: 3,
dPercent: 0,
permissible: 10,
},
...
];
The desired final output is:
[
{
"zone": "Neutral Axis",
"groups": [...]
},
{
"zone": "Bottom",
"groups": [...]
}
]
I aim to organize the data by zone, then within each zone by different group, and display the summed up values for original and gauge as shown in the final output.
If you'd like to see the code I have been working on, please visit this link:
Thank you very much in advance!