JSON looks like this
===========================
{
"op": {
"samples": {
"COL_1_RESULT": [
2533973817,
3745333807,
3745333807,
3745333807,
3745341999,
3745341999,
3745350191,
3745493551,
3745505839,
3745514031
],
"COL_2_RESULT": [
23,
22,
22,
22,
22,
22,
22,
22]
},
"samplesCount": 60,
"isPersistent": true,
"lastTStamp": 1562943374678,
"interval": 1000
}
}
===========================
Worked it out.
Just need to fully qualify the nest. Each layer.
===========================
{
"op": {
"samples": {
"COL_1_RESULT": [
2533973817,
3745333807,
3745333807,
3745333807,
3745341999,
3745341999,
3745350191,
3745493551,
3745505839,
3745514031
],
"COL_2_RESULT": [
23,
22,
22,
22,
22,
22,
22,
22]
},
"samplesCount": 60,
"isPersistent": true,
"lastTStamp": 1562943374678,
"interval": 1000
}
}
===========================
res=requests.get(url, auth=HTTPBasicAuth('*******', '*******')) json_data = json.loads(res.text) print(json_data) print(json_data['COL_2_RESULT'])This doesnt work ......... I assume its simple - but :)
Worked it out.
Just need to fully qualify the nest. Each layer.