0

I am using roo gem for reading an xlsx file.

sheet.each(identifier: 'identifier',name: 'name') do |hash|
  puts hash.inspect
  puts hash['identifier'] => prints empty
end

inspect correctly gives all the hash with all the key/ value pairs

{:identifier=>"3254",:name=>"Ins"}.....so on 

I need to fetch the value based on key at every loop. Did something like this puts hash['identifier'] which does not print anything.

How to achieve this.

Pardeep Dhingra
  • 3,916
  • 7
  • 30
  • 56
themaster
  • 453
  • 11
  • 32

0 Answers0