Could you give me some advice about parsing list from list of dictionary with some conditions in Python3.
From below list of json, I want to extract the max timestamp for each "id".
So the final output I want to have is like
[{
"id": 1,
"value": {
"val1": 400000000,
"val2": 750000000
},
"timestamp": 1600957822.2510917
},
{
"id": 2,
"value": {
"val1": 400000000,
"val2": 750000000
},
"timestamp": 1600958083.618805
}]
Is there any way I can do? Thanks in advance
[
{
"id": 1,
"value": {
"val1": 400000000,
"val2": 750000000
},
"timestamp": 1600957822.2510917
},
{
"id": 2,
"value": {
"val1": 400000000,
"val2": 750000000
},
"timestamp": 1600957857.3018847
},
{
"id": 2,
"value": {
"val1": 400000000,
"val2": 750000000
},
"timestamp": 1600958027.4114041
},
{
"id": 2,
"value": {
"val1": 400000000,
"val2": 750000000
},
"timestamp": 1600958083.618805
}]