Skip to content

Instantly share code, notes, and snippets.

@casperisfine
Created August 21, 2024 14:26
Show Gist options
  • Save casperisfine/826a398736f79bec4fa39791eda12b91 to your computer and use it in GitHub Desktop.
Save casperisfine/826a398736f79bec4fa39791eda12b91 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# frozen_string_literal: true
require "json"
File.open(ARGV.first).each_line do |line|
if line.include?('"value":')
obj = JSON.parse(line)
obj.delete("value")
puts JSON.dump(obj)
else
puts line
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment