Have a file in plaintext that looks as follows:
{
"user1":[int1, int2...intX],
"user2":[int1, int2...intX],
...
"userX":[int1, int2...intX]
}
I want to be able to cycle through all users and their corresponding lists of integers; what's the best way to load and parse through this object?
Eventually I want to do something like:
for user, intlist in [FILE]:
for item in intlist:
[perform some function on each int]
though I'm not sure the right way to set up the IO and then leveraging the json library.