I've encountered a JSON data set that has the following structure:
{
name: "Evelyn",
assignment: "SCRUM",
difficulty: 3,
fun: 4
}
And so on.
My goal is to calculate the average value of both difficulty and fun for each assignment in the dataset. With 10 sets/individuals and 56 assignments, I plan to filter out the assignments first to get 56 sets with 10 values each for fun and difficulty. Then, I can proceed to calculate the averages.
However, I'm finding it challenging to implement this plan as I'm unsure how to construct this new JSON array effectively. I've considered using map, reduce, and similar functions but have struggled to execute them properly. Is there an easier method to accomplish this task?