["python","json","list","types","type-conversion"]
Convert JSON array to Python list

import json array = '{"fruits": ["apple", "banana", "orange"]}' data = json.loads(array) That is my JSON array, but I would want to convert all the values in the 'fruits' string to a Python list. What would be the correct way of doing this?
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