Okay so my problem is that I need to print out one specific value from a json. I've managed to print out all the values but not the specific one I want.
The json looks like this:
"apple": {
"stuff": 111,
"food": [
{
"money": 4000,
"time": 36,
},
{
"money": 12210,
"time": 94,
It continues like that with money and time. So my problem is that when I do this:
ourResult = js['apple']['food']
for rs in ourResult:
print rs['time']
I receive all the times.. I only want to receive the time under money: 12210 for an example but I don't know how to do that when there is a colon and a value.
I thank you for all the help in advance.
apple.stuffis an integer and can't be iterated over. Did you mean to doourResult = js['apple']['food']?