harsh7i

PyJsonArray.py

Feb 22nd, 2023 (edited)
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.17 KB | None | 0 0
  1. import json
  2.  
  3. array = '{"fruits": ["apple", "banana", "orange"]}'
  4. data  = json.loads(array)
  5. print data['fruits']
  6. # the print displays:
  7. # [u'apple', u'banana', u'orange']
Add Comment
Please, Sign In to add comment