Advertisement
Guest User

Untitled

a guest
Mar 23rd, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. import json
  2.  
  3. # some JSON:
  4. json_data = json.dumps({
  5. "result":[
  6. {
  7. "run":[
  8. {
  9. "action":"stop"
  10. },
  11. {
  12. "action":"start"
  13. },
  14. {
  15. "action":"start"
  16. }
  17. ],
  18. "find": "true"
  19. }
  20. ]
  21. })
  22.  
  23. item_dict = json.loads(json_data)
  24. print len(item_dict['result'][0]['run'])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement