Hello, i am relatively new to Python & Django.
My Problem:
resp, content = httplib2.Http().request("http://api.xxxxx.com/api/" + username)
str_content = content.decode('utf-8')
user = json.loads(str_content)
i return the user string and try to use that on my template, the json looks like that:
{
"XXXXXX": {
"bans": 6,
"ban_info": {
"randomrandomrandom": "randomrandomrandom",
"randomrandom": "randomrandomrandomrandom"
}
}
how can i rotate through these items and access the random informations?
like: user['bans'] returns 6
but how do i get these random things? user['ban_info']['???'] should return
My English is not the best, sorry for that. I hope i described my problem good enough!
Thanks for every help on that topic, i also hope, that this is not a duplicate!