i have a json file that looks like below. In the result dictionary, there are keys which is date and each key has another dictionaries that have number key. These numbers means time. What I have to do is gather same number keys in different dates (ex: 2017-01-02[4]['buy']+ 2017-01-01[4]['buy']) and sum it, and get the average of buy or sold counts. I would like to know if there is simple and fast way to do this.
{
"result": {
"2017-01-02": {
"4": {
"buy": [
2
],
"sold": 4
},
"5": {
"buy": [
1
],
"sold": 4
},
"6": {
"buy": [
67
],
"sold": 54
}
},
"2017-01-01": {
"4": {
"buy": [
44
],
"sold": 8
},
"5": {
"buy": [
6
],
"sold": 14
},
"6": {
"buy": [
4
],
"sold": 67
}
}
}
}