Last active
February 8, 2018 01:09
-
-
Save bobzoller/76bd5266564028cd8992c1975a994a0a to your computer and use it in GitHub Desktop.
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
require "json" | |
STDIN.each_line do |line| | |
begin | |
log = JSON.parse(line).as_h | |
time = log.delete "time" | |
line = log.to_json | |
line = "{\"time\":\"#{time}\",#{line[1..-1]}" | |
puts line | |
rescue JSON::Error | |
puts line | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment