需求:查询结果返回一个JSONObject类,从该类中取出某个值
返回结果:{"id":2,"jsonrpc":"2.0",
"result":[{"authtype":"0",
"data_type":"0",
"lastlogsize":"0",
"lastns":"899268861",
"lastvalue":"1",}]
}
获取lastvalue的值
JSONObject josn = **********
String status = josn.getJSONArray("result").getJSONObject(0).getString("lastvalue");