I would like to parse data and get in output:
arg = "sth"
format(arg) # => { "event[actor]" => "sth" }
arg = {:a => "sth", :b => { :c => "sth else", :d => "trololo" }}
format(arg) # => { "event[actor][a]" => "sth", "event[actor][b][c]" => "sth else", "event[actor][b][d]" => "trololo" }
How to do that?