Created
June 15, 2013 00:11
-
-
Save advorak/5786198 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
########## | |
json_object.is_a?(String) # Returns true if json_object is an array, else false | |
json_object.is_a?(Array) # Returns true if json_object is an array, else false | |
############ | |
case json_object | |
when String | |
#do something here if string | |
when Array | |
#do something here if array | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment