Skip to content

Instantly share code, notes, and snippets.

@phanthaihuan
Created May 13, 2020 16:33
Show Gist options
  • Save phanthaihuan/ca14cec7195802525c367f636a928869 to your computer and use it in GitHub Desktop.
Save phanthaihuan/ca14cec7195802525c367f636a928869 to your computer and use it in GitHub Desktop.
How to parse the content from Json with Python
#!/usr/bin/env python
import json
import os
PWD = os.getcwd()
file_path = os.path.join(PWD, 'distros.js')
with open(file_path) as f:
distros_dict = json.load(f)
for distro in distros_dict:
print(distro['Name'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment