title: String to Hash of Hashes/Arrays
body: <p>I have this string which I need to convert to to a Hash :</p>
  
  <pre><code>str = '{:gender=&gt;{:content=&gt;"male"}, :names=&gt;[{:first=&gt;"Atair", :last=&gt;"Goron"}], :addresses=&gt;[{:country=&gt;"GB", :state=&gt;"ENG", :city=&gt;"London"}], :emails=&gt;[{:address=&gt;"agoron@keolis.com", :address_md5=&gt;"971b2fd0b83c900a5ca62c91dab80dd9"}, {:address=&gt;"atair.godon.75@facebook.com", :address_md5=&gt;"a0d958c1396300a344356d57b6836f9e"}], :jobs=&gt;[{:title=&gt;"Chief Executive Officer", :organization=&gt;"Kolis UK and Eire"}, {:title=&gt;"Deputy Managing Director", :organization=&gt;"Kolis UK", :date_range=&gt;{:start=&gt;"2008-04-01", :end=&gt;"2010-04-01"}}, {:title=&gt;"Project Director", :organization=&gt;"Keolis UK", :date_range=&gt;{:start=&gt;"2004-04-01", :end=&gt;"2008-04-01"}}, {:title=&gt;"Strategic Planning Director", :organization=&gt;"Eurostar", :date_range=&gt;{:start=&gt;"2002-04-01", :end=&gt;"2004-04-01"}}, {:title=&gt;"Commercial Director, Business Markets", :organization=&gt;"Eurostar", :date_range=&gt;{:start=&gt;"1999-11-01", :end=&gt;"2002-04-01"}}, {:title=&gt;"Brand Manager", :organization=&gt;"Eurostar", :date_range=&gt;{:start=&gt;"1998-06-01", :end=&gt;"1999-11-01"}}, {:title=&gt;"Business Forecasting Manager", :organization=&gt;"Eurostar", :date_range=&gt;{:start=&gt;"1997-08-01", :end=&gt;"1998-06-01"}}, {:title=&gt;"Principal Consultant", :organization=&gt;"Steer Davies Gleave", :date_range=&gt;{:start=&gt;"1995-04-01", :end=&gt;"1997-08-01"}}, {:title=&gt;"Transport Consultant", :organization=&gt;"Sir Alexander Gibb and Part", :date_range=&gt;{:start=&gt;"1990-01-01", :end=&gt;"1995-12-31"}}], :educations=&gt;[{:school=&gt;"U. of London"}, {:school=&gt;"University College London, U. of London", :date_range=&gt;{:start=&gt;"1987-01-01", :end=&gt;"1990-12-31"}}], :usernames=&gt;[{:content=&gt;"alistair.gordon.75"}], :user_ids=&gt;[{:content=&gt;"5/238/746@linkedin"}, {:content=&gt;"538818605@facebook"}, {:content=&gt;"15504678@linkedin"}]}'
  </code></pre>
  
  <p>I have floating number of keys, each key value can be either a string, array, hash or hash of hashes</p>
  
  <p>Is there way to convert it?</p>