title: Failing to parse JSON in Rails
body: <p>I am trying to have one of my pages request and display info from the last.fm API. At this point there is no user input and I just want the root page on my application to display the results of this API call. </p>
  
  <p>My last_fm Controller: </p>
  
  <pre><code>class LastFmController &lt; ApplicationController
      include HTTParty
      format :json
  
      base_uri 'http://ws.audioscrobbler.com/2.0/'
  
          def self.get_events
              return get('http://ws.audioscrobbler.com/2.0/', :query =&gt; {
                  :method =&gt; 'geo.getEvents',
                  :api_key =&gt; 'xxxxxyyyyyyzzzzz'})
          end
  
    def index
      @events = LastFmController.get_events
    end
  
  end
  </code></pre>
  
  <p>My last_fm#index view is empty except this: <code>&lt;%= @events %&gt;</code>.</p>
  
  <p>The error I'm getting when I go to the last_fm#index view:  </p>
  
  <pre><code>795: unexpected token at '&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;lfm status="ok"&gt;
  &lt;events xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" location="San Francisco, United States" page="1" perPage="10" totalPages="37" total="364" festivalsonly="0" tag=""&gt;
      &lt;event xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" &gt;
    &lt;id&gt;3782989&lt;/id&gt;
    &lt;title&gt;Broken Hope&lt;/title&gt;
    &lt;artists&gt;
      &lt;artist&gt;Broken Hope&lt;/artist&gt;
      &lt;artist&gt;Oceano&lt;/artist&gt;
  </code></pre>
  
  <p>This trace actually includes the entire hash I received from the API call, so it's long and I'm omitting it for brevity. </p>
  
  <p>The title of the error page is <code>Action Controller: Exception caught</code>. </p>
  
  <p>I would be thankful if I could just do some basic manipulation with the hash I received, like being able to navigate the hash and only display certain items. Thanks!</p>