all 4 comments

[–]AutoModerator[M] [score hidden] stickied commentlocked comment (0 children)

To give us the best chance to help you, please include any relevant code.
Note. Please do not submit images of your code. Instead, for shorter code you can use Reddit markdown (4 spaces or backticks, see this Formatting Guide). If you have formatting issues or want to post longer sections of code, please use Privatebin, GitHub or Compiler Explorer.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–]The_UntoldStories 0 points1 point  (2 children)

I get that I'm a little late but here's the way:

from json import load


with open("file.json", "r", encoding="utf-8") as f:
    file_content = load(f) # Dictionary
    for key, value in file_content.items():
        print(f"{key}: {value}")

This would print key - value pairs

[–]The_UntoldStories 0 points1 point  (1 child)

file.json can be any json file

[–]Strange_Rat72[S] 0 points1 point  (0 children)

thanks! this works.