Skip to content

Instantly share code, notes, and snippets.

@thushw
Created June 4, 2018 21:44
Show Gist options
  • Save thushw/40e425e31c83a04718b0e90e936a048f to your computer and use it in GitHub Desktop.
Save thushw/40e425e31c83a04718b0e90e936a048f to your computer and use it in GitHub Desktop.
require 'json'
require 'ostruct'
json_object = JSON.parse(json_string, object_class: OpenStruct)
json_object.data.each {
|d| puts "created time: %s message: %s id: %s" % [d.created_time, d.message, d.id]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment