Created
August 5, 2015 04:45
-
-
Save kannan4k/99ae3363ed0755411fde to your computer and use it in GitHub Desktop.
This file contains hidden or 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
if data['supplemental_data'] | |
data['supplemental_data'].inject({}) do |sum, parts| | |
sum | |
key, value = parts | |
sum[key.to_sym] = value.values | |
sum | |
end | |
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" | |
# } | |
# } | |
# } | |
Author
kannan4k
commented
Aug 5, 2015
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment