Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to pretty formatjson value on terminal ruby

require 'json'
my_object = { :array => [1, 2, 3, { :sample => "hash"} ], :foo => "bar" }
puts JSON.pretty_generate(my_object)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pretty #formatjson #terminal #ruby
ADD COMMENT
Topic
Name
2+4 =