Skip to content

Instantly share code, notes, and snippets.

@rufuspollock
Created April 14, 2013 11:34
Show Gist options
  • Save rufuspollock/5382390 to your computer and use it in GitHub Desktop.
Save rufuspollock/5382390 to your computer and use it in GitHub Desktop.
Print out list of fields in first file in this data package
import json
x = json.load(open('datapackage.json'))
finfo = x['files'][0]
for idx, f in enumerate(finfo['schema']['fields']):
print idx, f['id']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment