Last active
November 18, 2020 03:28
-
-
Save jcortesg/3cf3fa8d3bf50eb671839c4e1245740b to your computer and use it in GitHub Desktop.
keys
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
names =["id", "key" ]
values = []
event.tickets.each { |t| values << [ t.id, t.live_key ] }
hash = { version: 1, variables: [{names: names , values: values }]}
File.open("key.json", "wb") { |file| file.puts JSON.pretty_generate(hash) }