Guest User

Untitled

a guest
Nov 19th, 2017
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. {
  2. "Name":"TESTING",
  3. "Place":"India",
  4. "Path":"Road",
  5. "Details":
  6. [
  7. {
  8. "city":"",
  9. "landmark":"aaabbbcccc",
  10. "pin":"500001"
  11. },
  12. {
  13. "city":"",
  14. "landmark":"aaabbbcccc",
  15. "pin":"500001"
  16. },
  17. {
  18. "city":"",
  19. "landmark":"xxxyyyzzzz",
  20. "pin":"510009"
  21. }
  22. ]
  23. }
  24.  
  25. import glob, os, json
  26. from pprint import pprint
  27. jsonfile = "testing.json"
  28. with open('C:/Users/dev/Desktop/JSONSTest/'+jsonfile) as data_file:
  29. data = json.load(data_file)
  30. pprint(data)
  31.  
  32. for i in data['Details']:
  33. print i['city']
Add Comment
Please, Sign In to add comment