I'm on python 3.8. Here an example JSON file i'm working with:
{
"dict1": {
"text": "here",
"more text": "here too"
},
"dict2": {
"cool": "text",
"filler": "element"
}
}
I'm eventually gonna be working with multiple dicts and won't always know the names of them. When I do this:
import json
with open("jsonfile.json", "r") as file:
data = json.load(file)
for element in data:
if element is dict:
print(element)
It prints nothing. No error messages, just nothing. Thank you in advance!