Skip to content
Create a gist now

Instantly share code, notes, and snippets.

if k == "ActivityObject"
if @tripit_trip[k].is_a?(Hash)
@tripit_trip[k]["ObjectType"] = "ActivityObject"
tmp[ @tripit_trip[k]["StartDateTime"]["date"] ] = [] if tmp[ @tripit_trip[k]["StartDateTime"]["date"] ].nil?
tmp[ @tripit_trip[k]["StartDateTime"]["date"] ] << @tripit_trip[k]
elsif @tripit_trip[k].is_a?(Array)
@tripit_trip[k].sort_by { |h| h["StartDateTime"]["date"] }.each do |o|
o["ObjectType"] = "ActivityObject"
tmp[ o["StartDateTime"]["date"] ] = [] if tmp[ o["StartDateTime"]["date"] ].nil?
tmp[ o["StartDateTime"]["date"] ] << o
end
end
elsif k == "DirectionsObject"
......
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.