An network engineer issues a REST API call to a Cisco DNA Center controller to retrieve information regarding managed network devices. The controller returns the following JSON response payload:
{
"response": [
{
"family": "Switches and Hubs",
"hostname": "Dist-Switch-01",
"managementIpAddress": "192.168.10.1",
"upTime": "12 days, 04:12:00",
"interfaceList": [
{
"portName": "GigabitEthernet1/0/1",
"vlan": 10,
"status": "up",
"speed": 1000
},
{
"portName": "GigabitEthernet1/0/2",
"vlan": 20,
"status": "down",
"speed": 1000
}
]
},
{
"family": "Routers",
"hostname": "Edge-Router-01",
"managementIpAddress": "10.1.1.1",
"upTime": "45 days, 11:05:22",
"interfaceList": [
{
"portName": "GigabitEthernet0/0/0",
"vlan": 1,
"status": "up",
"speed": 10000
}
]
}
],
"version": "1.0"
}
Assuming the variable `data` holds the parsed Python dictionary representation of this JSON payload, which Python expression correctly extracts the operating status (`"status"`) of the second interface on the distribution switch (`Dist-Switch-01`)?
- data["response"][0]["interfaceList"][1]["status"]Answer
- Bdata["response"][1]["interfaceList"][2]["status"]
- Cdata["response"][0]["interfaceList"][2]["status"]
- Ddata["response"]["interfaceList"][0][1]["status"]