Independence Day Deal! Unlock 25% OFF Today – Limited-Time Offer - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

Cisco Exam 300-435 Topic 2 Question 79 Discussion

Actual exam question for Cisco's 300-435 exam
Question #: 79
Topic #: 2
[All 300-435 Questions]

Refer to the exhibit.

A Python script has been created that calls the Cisco SD-WAN vManage Device Inventory API to get the list of vEdges. The JSON data that returns to a Python dictionary has been converted and assigned to a variable named ''d''. A portion of the JSON is shown in the exhibit. Which code will complete the expression hostname= to access the hostname?

Show Suggested Answer Hide Answer
Suggested Answer: A

Contribute your Thoughts:

Stephane
28 days ago
Haha, this reminds me of that time I tried to access a nested dictionary without reading the docs. Rookie mistake!
upvoted 0 times
Glory
13 days ago
User 1: I've made that mistake before too.
upvoted 0 times
...
...
Gearldine
1 months ago
Ah, I see the key is 'host-name' - that makes sense. Time to put on my Python hat.
upvoted 0 times
...
Terry
1 months ago
Wait, are we allowed to use parentheses instead of square brackets? This is tricky!
upvoted 0 times
Dierdre
17 days ago
No, you should use square brackets for accessing elements in a dictionary.
upvoted 0 times
...
...
Mammie
2 months ago
Hmm, looks like I need to be careful with those square brackets and single quotes. I better double-check my syntax.
upvoted 0 times
Giovanna
2 days ago
A) d['data'][0]['host-name']
upvoted 0 times
...
Samuel
9 days ago
Got it, thanks for the reminder!
upvoted 0 times
...
Jerilyn
10 days ago
Make sure you use the correct syntax for accessing the hostname.
upvoted 0 times
...
Darell
1 months ago
A) d['data'][0]['host-name']
upvoted 0 times
...
...
King
2 months ago
Comment
upvoted 0 times
...
Carma
2 months ago
I'm not sure, but I'll go with A) as well. It seems like the most logical choice based on the JSON data provided.
upvoted 0 times
...
Myra
2 months ago
I agree with Maile, because the JSON data structure shows that the hostname is accessed through that path.
upvoted 0 times
...
Maile
3 months ago
I think the answer is A) d['data'][0]['host-name']
upvoted 0 times
...

Save Cancel
az-700  pass4success  az-104  200-301  200-201  cissp  350-401  350-201  350-501  350-601  350-801  350-901  az-720  az-305  pl-300  

Warning: Cannot modify header information - headers already sent by (output started at /pass.php:70) in /pass.php on line 77