Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def iter_json(json):
- for el in (json.values() if isinstance(json, dict) else json):
- if type(el) is dict or type(el) is list:
- for sub in iter_json(el):
- yield sub
- else:
- yield el
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement