I am new to Ruby and have hash problems.
I have XML returned from the YouTube API that I converted to a hash. Here is the hash returned by Hash.from_xml (): http://pastebin.com/9xxE6iXU
I am trying to grab specific elements from a hash for each result, such as a title, link, author, etc. Whenever I try to skip a hash or capture a specific element, I get the message "can not convert String into Integer".
Here is the code I use for the loop:
@data["feed"]["entry"]["title"].each do |key, value| "<p>"+key+" "+value+"</p>" end
I also tried to capture certain elements like @data ["feed"] ["entry"] ["title"] [0].
How do I skip a hash and capture certain elements?
source share