{
"code": 2001,
"message": "todays usage",
"results": [
{
"date": "2015-03-20",
"download": 7.063141,
"mac": "18f46ab79f0d",
"upload": 16.086909
}
],
"status": 200
}
如何从这个json对象获取下载值?我想获得下载的值并上传。
答案 0 :(得分:0)
示例:如果将上述json
分配给名为jsonObject
的变量:
var downloadValue = jsonObject.results[0].download;
var uploadValue = jsonObject.results[0].upload;