If you want to iterate over both keys and values of the dictionary, do this:

for key, value in data.items():
    print(key, value)
Answer from Lior on Stack Overflow
🌐
Zyte
zyte.com › home › blog › json parsing with python [practical guide]
JSON Parsing with Python [Practical Guide]
July 6, 2023 - Learn how to parse flat and nested JSON data with Python. This guide covers libraries, methods, and advanced json parsers like JMESPath and ChompJS.
🌐
Oxylabs
oxylabs.io › blog › python-parse-json
Reading & Parsing JSON Data With Python: Tutorial
The load() method takes up a file object and returns the JSON data parsed into a Python object. To get the file object from a file path, Python’s open() function can be used.
Discussions

Handling JSON files with ease in Python
Looks good. Considered discussing dataclasses/pydantic with json? I found that these go well together More on reddit.com
🌐 r/Python
55
421
May 29, 2022
Getting values from JSON using Python - Stack Overflow
error traceback could be useful ... related to the question (for python 3.6 at least), error has to be in the import or function use (as return present) ... Sign up to request clarification or add additional context in comments. ... import json import sys # load the data into ... More on stackoverflow.com
🌐 stackoverflow.com
Anyone know how to get JSON from a socket?
data is the bytes you read off the socket, so you don't call .read() on that thing. Just call data.decode('utf-8') More on reddit.com
🌐 r/Python
6
9
November 13, 2015
Storing and querying large json array of data
I think it will be "cleaner" to insert the JSON-data in the database as it is collected, then work on it, and then create the report using database queries. Even "small" database engines like MySQL are efficient at handling large volumes of data. Lots of boilerplate like caching in memory, encoding data, storing it to disk, sorting, querying logic, et cetera, will all be done "for free" inside the database. Maybe the database will be slower than custom searches in a dict-like structure living in RAM, but, if the entire structure will not fit inside the RAM available, anything one does in Python or even Pandas is likely to be a worse. . More on reddit.com
🌐 r/Python
9
6
October 13, 2022
🌐
Bright Data
brightdata.com › blog › how-tos › parse-json-data-with-python
Guide to Parsing JSON Data With Python
September 16, 2025 - You can import json as follows: ... The built-in Python json library exposes a complete API to deal with JSON. In particular, it has two key functions: loads and load. The loads function allows you to parse JSON data from a string.
🌐
ReqBin
reqbin.com › code › python › rituxo3j › python-requests-json-example
How do I get JSON using the Python Requests?
To request JSON data from the server using the Python Requests library, call the request.get() method and pass the target URL as a first parameter. The Python Requests Library has a built-in JSON decoder and automatically converts JSON strings ...
🌐
W3Schools
w3schools.com › python › gloss_python_json_parse.asp
Python JSON Parse
Python Examples Python Compiler ... Python Training ... If you have a JSON string, you can parse it by using the json.loads() method....
🌐
GeeksforGeeks
geeksforgeeks.org › python › response-json-python-requests
response.json() - Python requests - GeeksforGeeks
July 12, 2025 - To print the JSON data fetched we have used json() method which prints the JSON data in the Python dictionary format as seen in the output. In this way, we can pas parse JSON responses in Python. ... # import requests module import requests # Making a get request response = requests.get('https://api.github.com///') # print response print(response) # print json content print(response.json())
Find elsewhere
🌐
Reddit
reddit.com › r/python › handling json files with ease in python
r/Python on Reddit: Handling JSON files with ease in Python
May 29, 2022 -

I have finished writing the third article in the Data Engineering with Python series. This is about working with JSON data in Python. I have tried to cover every necessary use case. If you have any other suggestions, let me know.

Working with JSON in Python
Data Engineering with Python series

🌐
Medium
medium.com › @kemepley › how-to-navigate-jsons-in-python-e826807aa3be
How to navigate JSONs in Python. A tutorial using the Phylo Community… | by Kelly Epley | Medium
June 15, 2019 - To review: The Phylo Community Wiki provides the data in JSON format. Once you’ve loaded the JSON using the Python json library, you can navigate it using dictionary keys and list indices.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-program-to-extract-a-single-value-from-json-response
Python program to extract a single value from JSON response - GeeksforGeeks
July 23, 2025 - Import JSON from the modules. Open the JSON file in read-only mode using the Python with() function. Load the JSON data into a variable using the Python load() function. Now, get the value of keys in a variable.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-json
Python JSON - GeeksforGeeks
December 23, 2025 - Convert and transform data between JSON, XML, CSV, and text formats in Python, enabling easy storage, sharing, and interoperability across different applications. ... Perform additional JSON operations in Python, including formatting, pretty-printing, flattening nested objects, validating JSON strings, and sorting JSON data by values.
🌐
Programiz
programiz.com › python-programming › json
Python JSON: Read, Write, Parse JSON (With Examples)
In this tutorial, you will learn to parse, read and write JSON in Python with the help of examples. Also, you will learn to convert JSON to dict and pretty print it.
🌐
ReqBin
reqbin.com › code › python › g4nr6w3u › python-parse-json-example
How to parse a JSON with Python?
Nested JSON objects will also be processed and included in the dictionary (see example below). To parse a JSON file, use the json.load() paired method (without the "s"). In this Python Parse JSON example, we convert a JSON data string into a ...
🌐
W3Schools
w3schools.com › python › python_json.asp
Python JSON
If you have a JSON string, you can parse it by using the json.loads() method. The result will be a Python dictionary.
🌐
Real Python
realpython.com › python-json
Working With JSON Data in Python – Real Python
August 20, 2025 - After importing the json module, you can use .dumps() to convert a Python dictionary to a JSON-formatted string, which represents a JSON object. It’s important to understand that when you use .dumps(), you get a Python string in return.
🌐
Python
docs.python.org › 3 › library › json.html
json — JSON encoder and decoder
2 weeks ago - Source code: Lib/json/__init__.py JSON (JavaScript Object Notation), specified by RFC 7159(which obsoletes RFC 4627) and by ECMA-404, is a lightweight data interchange format inspired by JavaScript...
🌐
DataCamp
datacamp.com › tutorial › json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - The requests.get(url) line makes the actual request and stores the response in the response variable. The if response.status_code == 200: line checks if the response code is 200, which means the request was successful. If the request is successful, the code then loads the response text into a Python dictionary using the json.loads() method and stores it in the data variable.
🌐
Bobdc
bobdc.com › blog › pythonjson
Parsing JSON with Python
December 15, 2024 - My sample demo data to parse is pretty close to the test input that I used when I wrote about JSON2RDF: { "mydata": { "color": "red", "amount": 3, "arrayTest": [ "north", "south", "east", "escaped \"test\" string", "west" ], "boolTest": true, "nullTest": null, "addressBookEntry": { "givenName": "Richard", "familyName": "Mutt", "address": { "street": "1 Main St", "city": "Springfield", "zip": "10045" } } } } ... #!/usr/bin/env python3 import json f = open('jsondemo.js') data = json.load(f) print(data["mydata"]["color"]) print(data["mydata"]["amount"]) # Pull something out of the middle of an ar
🌐
Code Institute
codeinstitute.net › blog › python › working with json in python: a beginner’s guide
Working with JSON in Python: A Beginner's Guide - Code Institute Global
February 6, 2024 - In this blog, we’ll explore the basics of working with JSON in Python, covering everything from storing data in a file to encoding custom objects.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-parse-json-in-python-with-examples
How to Parse JSON in Python – A Complete Guide With Examples
October 29, 2025 - You'll use it to convert JSON strings into Python dictionaries and lists that you can manipulate with familiar syntax, and then convert your Python data structures back into JSON when you need to send data to an API or save it to a file. Beyond basic parsing, you'll often need to handle nested structures, validate data integrity, manage, and transform data formats. This guide covers practical JSON parsing techniques you can use in your projects right away. Let’s get started!