I have a string that I need to convert into a key value hash. I am using ruby 2.1 and rails 4. I used @msg.body.split("&") which converted the string to a array. Any help is appreciated. Thanks.
@msg.body => "longitude=-26.6446®ion_name=xxxx&timezone=US/Central&ip=xxxxxxx&areacode=xxx&metro_code=xxx&country_name=United States&version=0250303063A&serial=133245169991&user_agent=Linux 2 XS&model=3100X&zipcode=23454&city=LA®ion_code=CA&latitude= 56.1784&displayaspect=16x9&country_code=US&api_key=xxxxxxx&uuid=3489f464-2f9c-9c4c-d7d2-b51b7dd40ce3&event=appLoad&time_in_app=0"