Skip to content

Instantly share code, notes, and snippets.

@fiddyspence
Created November 30, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fiddyspence/f5edcdf75268e6646587 to your computer and use it in GitHub Desktop.
Save fiddyspence/f5edcdf75268e6646587 to your computer and use it in GitHub Desktop.
foo = JSON::load File.read '3.8.4.catalog.json'
bar = {}
bar = foo['data']
bar['metadata'] = foo['metadata']
bar['document_type'] = foo['document_type']
File.open('munge.json','w') {|f| f.write bar.to_json }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment