Q:

Rails 3 - Retrieve multiple lines from JSON response

I've successfully made API calls to Facebook, Twitter and LastFM to retrieve Likes, Followers and Listeners using code along the lines of:
 def get_twitter
    @artist = Artist.accessible_by(current_ability).find(params[:id])
    if @artist.twitter_screen_name.present?
      require 'open-uri'
      require 'json'
      result = JSON.parse(open("https://api.twitter.com/1/users/show.json?screen_name="<<@artist.twitter_screen_name<<"&include_entities=true").read)
      @followers = result["followers_count"]
    end
  end    

This works fine as there's only one data set returned and it's easy enough to access the bit I want. LastFM's response is nested and while it threw me, I managed to access the Listeners count almost exactly the same as above but just used the line:
@listeners = result["artist"]["stats"]["listeners"].to_i

Now, i'm trying to retrieve event listings from Songkick. Clearly a response contains more than one event so i'm having trouble with knowing how to loop through the response.
Their developers guide is here: http://www.songkick.com/developer/upcoming-events-for-artist
The sample response is as follows, but this is for only single event:
{
  "resultsPage:" {
    "results": { "event": [
      {
        "id":11129128,
        "type":"Concert",
        "uri":"http://www.songkick.com/concerts/11129128-wild-flag-at-fillmore?utm_source=PARTNER_ID&utm_medium=partner",
        "displayName":"Wild Flag at The Fillmore (April 18, 2012)",
        "start":{"time":"20:00:00",
                 "date":"2012-04-18",
                 "datetime":"2012-04-18T20:00:00-0800"},
        "performance":[{"artist":{"uri":"http://www.songkick.com/artists/29835-wild-flag?utm_source=PARTNER_ID&utm_medium=partner",
                                  "displayName":"Wild Flag","id":29835,"identifier":[]},
                        "displayName":"Wild Flag",
                        "billingIndex":1,
                        "id":21579303,
                        "billing":"headline"}],
        "location":{"city":"San Francisco, CA, US","lng":-122.4332937,"lat":37.7842398},
        "venue":{"id":6239,
                 "displayName":"The Fillmore",
                 "uri":"http://www.songkick.com/venues/6239-fillmore?utm_source=PARTNER_ID&utm_medium=partner",
                 "lng":-122.4332937, "lat":37.7842398,
                 "metroArea":{"uri":"http://www.songkick.com/metro_areas/26330-us-sf-bay-area?utm_source=PARTNER_ID&utm_medium=partner",
                              "displayName":"SF Bay Area","country":{"displayName":"US"},"id":26330,"state":{"displayName":"CA"}}},
        "status":"ok",
        "popularity":0.012763
      }, ....
    ]},
    "totalEntries":24,
    "perPage":50,
    "page":1,
    "status":"ok"
  }
}

Does anyone have any pointers?

A:

You just need to get to the array & iterate:
parsed = JSON.parse(some_json)
events = parsed['resultsPage']['results']['event']
events.each do |event|
  puts event["type"]
  #access other parts of the event
end

