import 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
July 23, 2025 - In this example, the below code utilizes the `json.loads()` method to convert a JSON-formatted string `[1,2,3,4]` into a Python list named `array`. The `print` statements display the type of the original string, the first element of the resulting ...
Discussions

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 - 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
How can I convert a JSON array to a Python list? - TestMu AI 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
How to get data from a list Json with python - Stack Overflow
I am new to python and have tried to get data from a python json document , what I try to do is pass the information to python and json from python print a pdf with a table style. My code in json i... More on stackoverflow.com
🌐 stackoverflow.com
🌐
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.
🌐
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.
🌐
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.
🌐
DataCamp
datacamp.com › tutorial › json-data-python
Python JSON Data: A Guide With Examples | DataCamp
December 3, 2024 - With its simple syntax and ability to represent complex data structures, JSON has become an integral part of modern web development, powering everything from APIs to client-side web applications. In this tutorial, I will explore the basics of working with JSON in Python, including serialization, deserialization, reading and writing JSON files, formatting, and more.
🌐
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 Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Certificate 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 ...
Find elsewhere
🌐
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.

🌐
AskPython
askpython.com › home › convert a list to json string in python [easy step-by-step]
Convert a List to JSON String in Python [Easy Step-By-Step] - AskPython
May 30, 2023 - Hence, we do not have to install it manually on our local system. We can directly import in by using the import statement. ... The json module has a function dumps() that is used to convert a list to JSON in Python.
🌐
Python
docs.python.org › 3 › library › json.html
JSON encoder and decoder — Python 3.14.3 documentation
February 23, 2026 - The old version of JSON specified by the obsolete RFC 4627 required that the top-level value of a JSON text must be either a JSON object or array (Python dict or list), and could not be a JSON null, boolean, number, or string value.
🌐
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...
🌐
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
community.testmuai.com › ask a question
How can I convert a JSON array to a Python list? - TestMu AI 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…
🌐
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.
🌐
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!

🌐
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.
🌐
Workato
systematic.workato.com › t5 › workato-pros-discussion-board › quot-help-with-parsing-json-string-into-python-list-getting › td-p › 8578
Solved: "Help with Parsing JSON String into Python List – ... - Systematic Community - 8578
January 30, 2025 - When I run this, I get the error: "TypeError: the JSON object must be str, bytes or bytearray, not NoneType". What could be causing this, and how can I fix it? Any help would be appreciated! Solved! Go to Solution. ... Hi @Patel0786 , In the 4th line please pass the output of 3rd line ( i.e. string_data). Please try and let me know. Thanks and Regards, Shivakumara K ... Python interprets this as a list of dictionaries because single quotes are valid for dictionary keys/values in Python.
🌐
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 - After parsing, products is a Python list containing three dictionaries. You can now use standard Python list operations on the parsed data. The len() function returns the number of items, and you can iterate through the list with a for loop.