Skip to content

Instantly share code, notes, and snippets.

@william-ml-leslie
Forked from kannan4k/supplemental.rb
Last active August 29, 2015 14:26
Show Gist options
  • Save william-ml-leslie/c50acc543a212da81710 to your computer and use it in GitHub Desktop.
Save william-ml-leslie/c50acc543a212da81710 to your computer and use it in GitHub Desktop.
if data['supplemental_data']
sum = {}
data['supplemental_data'].each_pair do |key, value|
sum[key] = value.values
end
sum
else
{}
end
#Here is the 'data' json which is converted into hash
#"supplemental_data": {
# "groups": {
# "144959": {
# "id": 144959,
# "name": "test3",
# "last_modified": "2013-07-12T15:32:25+00:00",
# "created": "2013-07-12T15:32:25+00:00"
# }
# }
# }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment