我正在编写一个 Python 脚本。我需要从文本文件中返回包含最大“uid”字段的行。例如,在下面的文本文件示例中:
{
"uid": 683,
"user_id": "2",
"timestamp": datetime.datetime(2020, 5, 17, 16, 39, 54),
"status": 1,
"punch": 0,
}, {
"uid": 684,
"user_id": "4",
"timestamp": datetime.datetime(2020, 5, 17, 16, 41, 20),
"status": 1,
"punch": 0,
}
返回文本文件例如:
{
"uid": 684,
"user_id": "4",
"timestamp": datetime.datetime(2020, 5, 17, 16, 41, 20),
"status": 1,
"punch": 0,
}