Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python get array from json

import json

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

PREVIOUS NEXT
Code Example
Python :: python convert input into lowercase 
Python :: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead 
Python :: python randrange 
Python :: python compare objects 
Python :: __str__ method python 
Python :: extract DATE from pandas 
Python :: add item to python dictionary 
Python :: online python 
Python :: how to add to the end of an array python 
Python :: how to find permutation of numbers in python 
Python :: qt designer messagebox python 
Python :: python callable type hint 
Python :: python train test val split 
Python :: iterating through a list in python 
Python :: laplace transform python 
Python :: add readme cmd 
Python :: download image from url python requests 
Python :: current url in djago 
Python :: lamda python 
Python :: destroy label tkinter 
Python :: python save button 
Python :: glob python 
Python :: tiff to jpg in python 
Python :: python nested list 
Python :: python datetime greater than now 
Python :: sklearn regression 
Python :: break in python 
Python :: adding to python path 
Python :: how to reference variable in another file python 
Python :: how to convert unicode to string python 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =