<% results.each do |result| %> <% if result[:type] == "item" %>

You got <%= result[:quantity] %> <%= result[:item].name %> <% if result[:xp].any? %> (<%= result[:xp].map { |award| "#{award[:amount]} xp #{award[:skill].name}" }.join(", ") %>) <% end %>

<% end %> <% end %>