Skip to content

Instantly share code, notes, and snippets.

@cataphract
Last active November 18, 2019 18:05
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 cataphract/48873193ec3344fe7de064b31cc32df1 to your computer and use it in GitHub Desktop.
Save cataphract/48873193ec3344fe7de064b31cc32df1 to your computer and use it in GitHub Desktop.
require 'json'
data = ARGF.read
json = JSON.load data
json = json['results']['data']
json = json.select { |x| x[6] == 'v' }
json = json.map { |x| [x[5], JSON.load(x[7])] }
puts JSON.dump(json)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment