Ruby Ruby Loops Build a Simple Contact List Hash and Array Iteration

Why isn't this printing out the values?

Not printing out the values for both keys

contact_list.rb
contact_list = [
  {"name" => "Jason", "phone_number" => "123"},
  {"name" => "Nick", "phone_number" => "456"}
]

contact_list.each{ |name, phone_number|
  contact = "#{name}, #{phone_number}"
  }

puts contact

1 Answer

Hi, you close:

contact_list.each do |contact|
  puts contact["name"]
  puts contact["phone_number"]
end