Json Data Manipulation Activity

Time: 20-30 minutes

Purpose: Give you practice with parsing .json files

Introduction: Try to solve the following problem. The data file that you will need to parse through can be found here. Try to solve this on your own before watching the solution video or looking at the solution file. Feel free to ask questions here if you find anything confusing.

Task:
For this activity use the data in jsonperdata.json and for each dictionary in the data section, compare the sum of averageResolve, averageConnect, averageTransfer and averageClosing to the averageTotal. If the difference between the sum of all the other averages to the average total is more than 1 second, print out the difference along with the starting time stamp.

Outputs should look something like this:

At time 2019-09-02T16:00:00Z:
The sum was 951.11 and the total was 959.82

Solution file for this can be seen here but don’t look at this until you have tried to solve this on your own.