我写了一个查询,它返回一个结果集,如下所示,
result = [
{"total_requests" : "4", "requesttimestamp" : null},
{"total_requests" : "2", "requesttimestamp" : null},
{"total_requests" : "4", "requesttimestamp" : null},
{"total_requests" : "7", "requesttimestamp" : null},
{"total_requests" : "1", "requesttimestamp" : 1.37412742E9},
{"total_requests" : "1", "requesttimestamp" : 1.37412781E9},
{"total_requests" : "1", "requesttimestamp" : 1.374127424E9}
]
当尝试通过这个迭代
result[i]["total_requests"] ,result[i]["requesttimestamp"]
得到它给出的未定义的结果对。
那么如何分别检索值对呢?