How Does Rack Parse Query Params? With Parse_nested_query
irb(main):018:0> query = "filters[colour][]=Red&filters[colour][]=Blue&filters[size]=Medium" => "filters[colour][]=Red&filters[colour][]=Blue&filters[size]=Medium" irb(main):019:0> irb(main):020:0> Rack::Utils.parse_nested_query(query) => {"filters"=>{"colour"=>["Red", "Blue"], "size"=>"Medium"}}
解析url query 的参数为 hash:
Rack::Utils.parse_nested_query(query)
http://codefol.io/posts/How-Does-Rack-Parse-Query-Params-With-parse-nested-query/