300-435 · Question #61
Refer to the exhibit. Cisco SD-WAN deployment must be troubleshooted using vManage APIs. A call to vEdge Hardware Health API returns the data in the exhibit (only a portion is shown). If this JSON…
The correct answer is D. d['data'][0]['statusList'][0]['status']. To access a specific "status" field in a nested JSON structure from a vManage API response, Python dictionary indexing is used to navigate through lists and keys to the desired element.
Question
Options
- Ad['data'][0]['statusList'][0]['status']
- Bd['data'][1]['statusList'][0]['status']
- Cd['data'][0]['statusList'][0]['status']
- Dd['data'][0]['statusList'][0]['status']
How the community answered
(50 responses)- A4% (2)
- B6% (3)
- C12% (6)
- D78% (39)
Why each option
To access a specific "status" field in a nested JSON structure from a vManage API response, Python dictionary indexing is used to navigate through lists and keys to the desired element.
This choice is identical to the correct answer D and is technically correct based on the structure implied, suggesting a potential issue with the question's options.
d['data'][1]['statusList'][0]['status'] would attempt to access the second element of the 'data' list, which would be incorrect if the target status is in the first element.
This choice is identical to the correct answer D and is technically correct based on the structure implied, suggesting a potential issue with the question's options.
Assuming the exhibit shows the "status" value on line 16 is located within the first element of the 'data' array and then within the first element of the 'statusList' array, d['data'][0]['statusList'][0]['status'] correctly accesses this specific value. Python's dictionary and list indexing allows precise navigation through complex JSON data structures.
Concept tested: Python dictionary and JSON parsing
Topics
Community Discussion
No community discussion yet for this question.