Alphabetize JSON object in ruby
Blog
kitt decided around 12:33 on 13 April 2015 to publish this:
... # ActiveSupport = a rails thing... json objects are Hashes json_object = ActiveSupport::JSON.decode(request.body) # look! comments in code! json_object = Hash[json_object.keys.sort.map {|k| [k, json_object[k]]}] ...
Add new comment