Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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']
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #array #json
ADD COMMENT
Topic
Name
6+1 =