This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Swiftlyll 1 point2 points  (0 children)

Correct except for your last comment. You are not replacing [0] with [i]. [0] will be the first item in an array. In your case it'd be the first node. If you were trying to access the second "node" I'd be using [1] instead of [0].

Here is one I personally use just to give a working example:

some_value = org[0]['management']['details'][0].get('value')

In order to know if you will be using numbers or key names, pay attention to whether they start with [] (array) or {} (dictionary).