I'm beginner in programming and really need your help with problem in Python.
I have python script like this:
import requests
import json
response = requests.get('http://192.168.1.194/status/relay/')
print(json.dumps(response.json(), indent = 4))
Which generate in cmd list like this
{
"wifi_sta": {
"connected": true,
"ssid": "Network 3",
"ip": "192.168.1.194",
"rssi": -60
},
"cloud": {
"enabled": true,
"connected": false
}
I'm fighting since yesterday to reduced response to one information - to status in row "enabled" : true How I have to change code to get only word "true" from key "cloud" subkey "enabled" ?
I know how to get key cloud with two subkeys but I don't have any idea how to get value from subkey "enabled".
Thank you for answers..