Copyimport json

array = '{"fruits": ["apple", "banana", "orange"]}'
data  = json.loads(array)
print(data['fruits']) 
# the print displays:
# ['apple', 'banana', 'orange']

You had everything you needed. data will be a dict, and data['fruits'] will be a list

Answer from jdi on Stack Overflow
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-json-to-list
Python Json To List - GeeksforGeeks
April 18, 2026 - In this article, we will explore multiple methods to convert JSON to a Python list.
Discussions

How can I convert a JSON array to a Python list? - Ask a Question - TestMu AI (formerly LambdaTest) Community
I have the following JSON array: import json array = '{"fruits": ["apple", "banana", "orange"]}' data = json.loads(array) In this case, I want to convert all the values in the ‘fruits’ string to a Python list. What is the correct way of doing this using Python JSON to list? More on community.testmuai.com
🌐 community.testmuai.com
0
January 9, 2025
python - Convert a list to json objects - Stack Overflow
You can then take a list of any 7 titles you want and use them as keys to create the dictionary of each json object in the final list. try: from itertools import izip except ImportError: # Python 3 izip = zip try: xrange except NameError: # Python 3 xrange = range def grouper(n, sequence): ... 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
convert JSON list to dictionary
Well, isn't the JSON you're loading fundamentally a list? If you want to access each item you just loop over that list. More on reddit.com
🌐 r/learnpython
8
0
January 13, 2024
🌐
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.
🌐
CodeSpeedy
codespeedy.com › home › convert json to list in python
Convert JSON to list in Python - CodeSpeedy
July 9, 2019 - Initially, we declared a JSON array, ‘array’ which is a string. json.loads(array) converts JSON array to Python object i.e. list (here) and the value is stored in data variable. Then by using the print statement, we printed out the Python list.
🌐
GeeksforGeeks
geeksforgeeks.org › python › convert-python-list-to-json
Convert Python List to Json - GeeksforGeeks
July 23, 2025 - JSON (JavaScript Object Notation) is a lightweight data interchange format that is easy for humans to read and write, and easy for machines to parse and generate. In Python, the json module provides a convenient way to work with JSON data. In this article, we'll explore how to convert Python lists to JSON, along with some examples.
🌐
W3Schools
w3schools.com › python › python_json.asp
Python JSON
Remove List Duplicates Reverse a String Add Two Numbers · Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Training ... JSON is a syntax for storing and exchanging data. JSON is text, written with JavaScript object notation. Python has a built-in package called json, which can be used to ...
🌐
ItSolutionstuff
itsolutionstuff.com › post › convert-json-array-to-python-list-exampleexample.html
Convert JSON Array to Python List Example - ItSolutionstuff.com
October 30, 2023 - import json # Convert JSON Array to Python List Code myJsonArray = '{"websites": ["itsolutionstuff.com", "hdtuto.com", "nicesnippets.com"]}' data = json.loads(myJsonArray) print(data['websites'])
Find elsewhere
🌐
Softhints
softhints.com › python-json-to-list-and-json-to-dict-examples
Python json to list and json to dict examples - Softhints
February 10, 2022 - In order to retrieve list from JSON structure you need to use access operator. So if your JSON containing objects which are Arrays / List you can access them by: ... import json jsonData = '{"list": ["java", "python", "groovy", "ruby"]}' jsonData ...
🌐
TestMu AI
community.testmuai.com › ask a question
How can I convert a JSON array to a Python list? - Ask a Question - TestMu AI (formerly LambdaTest) Community
January 9, 2025 - I have the following JSON array: import json array = '{"fruits": ["apple", "banana", "orange"]}' data = json.loads(array) In this case, I want to convert all the values in the ‘fruits’ string to a Python list. What is…
🌐
Pythonspot
pythonspot.com › json-encoding-and-decoding-with-python
Python Json — Tutorial with Examples | Pythonspot
January 1, 2026 - Learn Python JSON encoding and decoding. Use json.dumps() and json.loads() with examples.
🌐
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.

🌐
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...
🌐
DataCamp
datacamp.com › tutorial › json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - While Python is capable of storing intricate data structures such as sets and dictionaries, JSON is limited to handling strings, numbers, booleans, arrays, and objects. Let’s look at some of the differences: To convert a Python list to JSON format, you can use the json.dumps() method from ...
🌐
Real Python
realpython.com › python-json
Working With JSON Data in Python – Real Python
August 20, 2025 - As you learned before, there are Python data types like tuple that you can convert into JSON, but you’ll end up with an array data type in the JSON file. Once you convert the JSON data back to Python, then an array deserializes into the Python list data type.
🌐
Medium
medium.com › @AlexanderObregon › how-to-work-with-json-in-python-aef62d28eac4
How to Work with JSON in Python | Medium
November 2, 2024 - To read JSON data from a file, you can use the json.load() function. This function reads the file's content and converts it into a Python object, typically a dictionary or a list, depending on the JSON structure.
🌐
Zyte
zyte.com › home › blog › json parsing with python [practical guide]
JSON Parsing with Python [Practical Guide]
July 6, 2023 - 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 objects such as lists and dictionaries.
🌐
Reddit
reddit.com › r/learnpython › convert json list to dictionary
r/learnpython on Reddit: convert JSON list to dictionary
January 13, 2024 -

I must first preface this with the fact that I’m extremely new to python. Like just started learning it a little over a week ago.
I have been racking my brain over how to convert a json object I opened and loaded into a dictionary from a list so I can use the get() function nested within a for loop to do a student ID comparison from another json file (key name in that file is just ID).
Below is the command I’m trying to load the json file:
With open(‘file.json’) as x: object=json.load(x)
When I print(type(object)), it shows up as class list.
Here’s a sample of what the json looks like:
[

{

“Name”: “Steel”,

“StudentID”: 3458274

“Tuition”: 24.99

},

{

“Name”: “Joe”,

“StudentID”: 5927592

“Tuition”: 14.99

}

]
HELP! Thank you!

🌐
Linux Hint
linuxhint.com › python-list-to-json
Linux Hint – Linux Hint
October 20, 2021 - Linux Hint LLC, [email protected] 1210 Kelly Park Circle, Morgan Hill, CA 95037 Privacy Policy and Terms of Use