请教一下JSONObject 和 JSONArray 怎么解析一下数据

要求获得Datas下的Value。

图片说明

{
    "ResultObj":[
        {
            "DataRecordCount":2950956,
            "DeviceID":86584,
            "Name":"GateWay001",
            "Datas":[
                {
                    "ApiTag":"m_temperature",
                    "Value":2.08,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_humidity",
                    "Value":3.66,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_co2",
                    "Value":36.01,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_body",
                    "Value":1,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_smoke",
                    "Value":0,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_Infrared",
                    "Value":0,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_light",
                    "Value":1.83,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"nl_temperature",
                    "Value":"",
                    "RecordTime":"2020-04-08 15:58:01"
                },
                {
                    "ApiTag":"nl_humidity",
                    "Value":"",
                    "RecordTime":"2020-04-08 15:58:01"
                },
                {
                    "ApiTag":"z_temperature",
                    "Value":61.7,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"z_humidity",
                    "Value":50,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"z_body",
                    "Value":1,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"z_fire",
                    "Value":87,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"z_light",
                    "Value":15392.99,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"z_air_quality",
                    "Value":4.63,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"z_combustible",
                    "Value":3.64,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_wind_speed",
                    "Value":1.1,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_fan",
                    "Value":true,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"vtapvqncdjfh",
                    "Value":true,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"m_alarmlight",
                    "Value":false,
                    "RecordTime":"2020-04-08 17:20:10"
                },
                {
                    "ApiTag":"nl_fan",
                    "Value":1,
                    "RecordTime":"2020-04-08 15:58:01"
                },
                {
                    "ApiTag":"zbefwwzebvgn",
                    "Value":"",
                    "RecordTime":"2020-04-08 15:58:01"
                },
                {
                    "ApiTag":"ddwyegyjlmou",
                    "Value":"",
                    "RecordTime":"2020-04-08 15:58:01"
                }
            ]
        }
    ],
    "Status":0,
    "StatusCode":0,
    "Msg":null,
    "ErrorObj":null
}

1个回答

weixin_43539011
我妍我妍 羞涩
4 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐