I have a json object that contains a list. I am just simply trying to extract the top level element and the value inside a list and print it.
My json is as follows
{
'apple': [1001, 1002],
'banana': [2001, 2002],
'figs': [3001]
}
I want to simply do something like:
for each fruit in this list, print the number.
E.g.
It is apple with code 1001
It is apple with code 1002
It is banana with code 2001
It is banana with code 2002
It is figs with code 3001
I have been trying to use this for each statement in Python but I can't seem to get the value within the list.
Thanks
forstatement look like? Please include the code