JSON list of dictionaries to python -


my json file list of dictionaries enter image description here

i able open not sure how access "the_dict" dictionary can retrieve , print "test" , "pie" in python program.

with open('my_settings.json') json_data:     config = json.load(json_data)  # my_words = config["the_dict"] tried not work 

config_file list, not dictionary, have observed. need access first dictionary in list, , call key "the_dict" "words" list of words:

my_words = config_file[0]["the_dict"]["words"] 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -