Это мой JSON-файл, и я хочу суммировать все значения числового ключа. Как я могу сделать это с Python?
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 7,
"max_score": 1.0,
"hits": [{
"_index": "test",
"_type": "json",
"_id": "5878",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}, {
"_index": "test",
"_type": "json",
"_id": "1548",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}, {
"_index": "test",
"_type": "json",
"_id": "2751",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}, {
"_index": "test",
"_type": "json",
"_id": "8363",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}, {
"_index": "test",
"_type": "json",
"_id": "551",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}, {
"_index": "test",
"_type": "json",
"_id": "2195",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}, {
"_index": "test",
"_type": "json",
"_id": "2990",
"_score": 1.0,
"_source": {
"data_type": "click",
"number": 1,
"date": "1397/05/14",
"host_id": "1231"
}
}]
}
}