json_data = [] # your list with json objects (dicts)

with open('prueba.json') as json_file:
   json_data = json.load(json_file)

for item in json_data:
    for data_item in item['data']:
        print data_item['name'], data_item['value']
Answer from konart on Stack Overflow
๐ŸŒ
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.
Discussions

How do I read a list of JSON files from file in python? - Stack Overflow
I have a list of JSON files saved to disk that I would like to read. Sometimes the JSON files span more than one line and so, I think that a simple list comprehension that loops over open(file,'rb'). More on stackoverflow.com
๐ŸŒ stackoverflow.com
Convert JSON array to Python list - Stack Overflow
That is my JSON array, but I would want to convert all the values in the 'fruits' string to a Python list. More on stackoverflow.com
๐ŸŒ stackoverflow.com
How to parse JSON file into Python list - Stack Overflow
I am trying to parse a JSON file into Python but failing to print any specific data I am trying to pull from JSON. How can I put these JSON data in separate arrays, so I can play with them in Pyth... More on stackoverflow.com
๐ŸŒ stackoverflow.com
List all JSON keys in a file to identify database column names from a file using Python
JSON is just a string. You can convert that string into a Python data structure. If that string exists in a file, here is how to read that content. import json with open('the_file.json') as file: data = json.load(file) keys = data.keys() More on reddit.com
๐ŸŒ r/learnpython
10
2
July 9, 2022
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ json.html
JSON encoder and decoder โ€” Python 3.14.4 documentation
February 23, 2026 - Deserialize fp to a Python object using the JSON-to-Python conversion table. ... fp (file-like object) โ€“ A .read()-supporting text file or binary file containing the JSON document to be deserialized.
๐ŸŒ
Real Python
realpython.com โ€บ python-json
Working With JSON Data in Python โ€“ Real Python
August 20, 2025 - Just like when writing files, itโ€™s a good idea to use a context manager when reading a file in Python. That way, you donโ€™t need to bother with closing the file again. When you want to read a JSON file, then you use json.load() inside the ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ python-json-to-list
Python Json To List - GeeksforGeeks
July 23, 2025 - In this article, we will explore four simple and commonly used methods to convert JSON to a list in Python.
๐ŸŒ
Python Examples
pythonexamples.org โ€บ python-json-to-list
Python JSON to List
Python JSON to List - To convert a JSON String to Python List, use json.loads() function. loads() function takes JSON Array string as argument and returns a Python List. In this tutorial, we have examples to load json array string to python list.
Find elsewhere
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - JSON provides a simple and easy-to-read format for storing and retrieving configuration data. This can include settings for the application, such as the layout of a user interface or user preferences. IoT (Internet of Things). IoT devices often generate large amounts of data, which can be stored and transmitted between sensors and other devices more efficiently using JSON. python_obj = { "name": "John Doe", "age": 30, "email": "john.doe@example.com", "is_employee": True, "hobbies": [ "reading", "playing soccer", "traveling" ], "address": { "street": "123 Main Street", "city": "New York", "state": "NY", "zip": "10001" } } print(python_obj)
๐ŸŒ
Quora
quora.com โ€บ How-do-you-parse-a-JSON-list-in-Python
How to parse a JSON list in Python - Quora
Answer (1 of 3): Before you can start working with JSON in Python, you'll need some JSON to work with. There are a few things that you'll need to set up first. First, create a Python file that will hold your code for these exercises. Inside the file, import the JSON module. [code]import json [/c...
๐ŸŒ
Zyte
zyte.com โ€บ home โ€บ blog โ€บ json parsing with python [practical guide]
A Practical Guide to JSON Parsing with Python
July 6, 2023 - To read JSON data, you can use the built-in json module (JSON Encoder and Decoder) in Python. The json module provides two methods, loads and load, that allow you to parse JSON strings and JSON files, respectively, to convert JSON into Python ...
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ read-json-file-using-python
Read JSON file using Python - GeeksforGeeks
We will be using Pythonโ€™s json module, which offers several methods to work with JSON data. In particular, loads() and load() are used to read JSON from strings and files, respectively.
Published ย  September 15, 2025
Top answer
1 of 4
3

There's just a slight problem with your for loop.

james@VIII:~/Desktop$ ls
f.txt
james@VIII:~/Desktop$ cat f.txt 
{
"Ask":
   {"0":[[9.13,30200],[9.14,106946],[9.15,53072],[9.16,58104],[9.17,45589]],
    "1":[[9.14,106946],[9.15,53072],[9.16,58104],[9.17,45589],[9.18,37521]] },

"Bid":
   {"0":[[9.12,198807],[9.11,1110],[9.1,42110],[9.09,84381],[9.08,98178]],
    "1":[[9.13,13500],[9.12,198807],[9.11,1110],[9.1,42110],[9.09,84381]]}
}
james@VIII:~/Desktop$ python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17) 
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import json
>>> with open('f.txt') as f_in:
...     data = json.load(f_in)
... 
>>> data
{'Ask': {'0': [[9.13, 30200], [9.14, 106946], [9.15, 53072], [9.16, 58104], [9.17, 45589]], '1': [[9.14, 106946], [9.15, 53072], [9.16, 58104], [9.17, 45589], [9.18, 37521]]}, 'Bid': {'0': [[9.12, 198807], [9.11, 1110], [9.1, 42110], [9.09, 84381], [9.08, 98178]], '1': [[9.13, 13500], [9.12, 198807], [9.11, 1110], [9.1, 42110], [9.09, 84381]]}}
>>> data['Ask']
{'0': [[9.13, 30200], [9.14, 106946], [9.15, 53072], [9.16, 58104], [9.17, 45589]], '1': [[9.14, 106946], [9.15, 53072], [9.16, 58104], [9.17, 45589], [9.18, 37521]]}
>>> 
>>> data['Bid']
{'0': [[9.12, 198807], [9.11, 1110], [9.1, 42110], [9.09, 84381], [9.08, 98178]], '1': [[9.13, 13500], [9.12, 198807], [9.11, 1110], [9.1, 42110], [9.09, 84381]]}
>>> for x in data['Bid']['0']:
...     print(x)
... 
[9.12, 198807]
[9.11, 1110]
[9.1, 42110]
[9.09, 84381]
[9.08, 98178]

Your for loop just needed to be changed a little.

PS you don't need to specify 'r' when reading the file.

You can also get individual values like this:

>>> for x in data['Bid']['0']:
...     print(str(x[0]) + ': ' + str(x[1]))
... 
9.12: 198807
9.11: 1110
9.1: 42110
9.09: 84381
9.08: 98178
2 of 4
0

your for is loop in the keys of dict.

for x in data["Bid"]:
  print(type(x))
# <class 'str'>

try it:

for x in data['Bid']['0']:
 print(x)

or

for x in data['Bid'].values():
 print(x)

sorry for my English :)

๐ŸŒ
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 - The core functions handle the most common operations: json.loads() parses JSON strings into Python objects, and json.load() reads and parses JSON from files. JSON parsing automatically converts between JSON and Python data types.
๐ŸŒ
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.
๐ŸŒ
Python Examples
pythonexamples.org โ€บ python-read-json-file
Python Read JSON File
import json fileObject = open("data.json", "r") jsonContent = fileObject.read() aList = json.loads(jsonContent) print(aList[0]) print(aList[0]['c']) ... In this Python JSON Tutorial, we learned how to read JSON file in Python and access values from the JSON content.
๐ŸŒ
Reddit
reddit.com โ€บ r/learnpython โ€บ list all json keys in a file to identify database column names from a file using python
r/learnpython on Reddit: List all JSON keys in a file to identify database column names from a file using Python
July 9, 2022 -

I am learning Python, and in particular, working with JSON and sqlite in Python. Ultimately I plan to use Python to load the JSON into a sqlite database.

Here is the question: Is there a way in to list all of the keys from a JSON file (not from a string) using Python? I want a list of all of the keys so I can determine what columns I will need/use in my sqlite table(s), without having to manually read the file and make a list.

BTW, this is something along the lines of using INFORMATION_SCHEMA.COLUMNS in SQL Server, or the FINDALL in Python for XML.

All of this is for personal learning, so I'm not looking to use other technologies, I'm sticking to Python, JSON, and sqlite on purpose.