Reading a tweet - getting rid of 'nil'


#1
username = tweet["user"]["name"]
  tweet_text = tweet["text"]
  print "#{username} - #{tweet_text}"

does not work because for some reason, 'nil' gets appended to the print statement.

so the output is:

uɐᴉɹoʞᴉɹʞ ᴉɟɟɐɹ - want to work on large scale? "Of course, we still have plenty more to do." #JoinTheFlock http://t.co/cEoSgiipnil

instead of:

ɐᴉɹoʞᴉɹʞ ᴉɟɟɐɹ - want to work on large scale? "Of course, we still have plenty more to do." #JoinTheFlock http://t.co/cEoSgiip

no idea how to fix this. i've tried using chomp, to no avail


#2

The problem is not the "nil" at the end. It's the upside down user name :wink:

This solution worked for me: http://discuss.codecademy.com/t/parsing-responses-for-the-reading-a-tweet-section/17712/3