How you access data within a Dictionary depends on how the Dictionary is structured. To the best of my knowledge, there is no way to get any key from a dictionary with a depth more than 1, or at least none that I know of.
This is because if is possible to have more than one key with the same name. For example, the following:
{
"Dog One" :
{
"Age": 4,
"Color": "Brown",
}
"Dog Two":
{
"Age": 8
"Color": "Black",
}
}
In this example, it would be very difficult to get the "Age" key without moving through the Dictionary structure, as the "Age" key is used multiple times, making it very hard to know which key you are wanting.
So long as you know the structure of the data within the Dictionary, it accessing dictionaries within dictionaries shouldn't be too hard. What are you trying to access?
For example, if you want to get the data within "000", then the following should work:
#Assuming dialog_json is the dictionary shown above and
# it has been successfully loaded/populated...
# Get the WhichScene dictionary
var json_data_whichscene = dialog_json["WhichScene"]
# Get the Template dictionary
var json_data_template = json_data_whichscene["Template"]
# Get the 000 dictionary
var json_data_000 = json_data_template["000"]
print (json_data_000)
# Depending on your needs, you can do all of the accessing in a single step:
var json_data_000_single = dialog_json["WhichScene"]["Template"]["000"]
print (json_data_000_single)
How you retrieve the data really depends on how the data is structured, and what data you have to work with. The example above breaks the example down into multiple steps, which hopefully helps show it you can access the data.
Working with dictionaries becomes a little more complicated when you have user generated data that can vary in what is stored and the names used, but even that just takes knowing what you are working with and working with the data you have available.
Hopefully this helps :smile: