I am in possession of a group of json values outlined below
{"labels":[ "time", "softirq", "user", "system", "nice", "iowait" ], "data":[ [ 1490088352, 0, 14.64646, 3.53535, 0, 1.0101 ], [ 1490088351, 0, 27.77778, 3.0303, 0, 0 ], [ 1490088350, 0.49751, 12.93532, 2.98508, 0, 4.47761 ] }
My aim is to analyze this json file. I intend to add up the values for
{ "softirq", "user", "system", "nice", "iowait"}
labels and store them in a separate variable named "sum". The anticipated output should resemble the following:
{ "time" : 1490088352 , "sum": "the calculated total value "}
{"time" : 1490088351 , "sum": "the calculated total value "}
{"time" : 1490088350 , "sum": "the calculated total value "}
If anyone could provide assistance with this query, it would be greatly appreciated.