The problem I''m having is that I need to extract the value of amazon and chef separately. Right now they are both held in the b value in my iteration. I tried to create another loop within the value.each but i''m getting an error. How do I efficiently extract both value separately and efficiently? any help would be greatly appreciated. I''m getting my hash from a yaml file this way require ''yaml'' path = File.join(Rails.root, ''config'', ''stage-aws-opscode.yml'') SAO = YAML.load_file(path) The stage-aws-opscode.yml contains the following data sandbox: &defaults amazon: aws-green chef: mdsol validation: <<: *defaults cruise: <<: *defaults hendricks: <<: *defaults distro: <<: *defaults performance: <<: *defaults innovate: amazon: aws-red chef: mdsol-production production: amazon: aws-red chef: mdsol-production this is my iteration. <% SAO.each do |key, value| parent = "#{key}" value.each do |a, b| "#{a}" "#{b}" end end %> -- Posted via http://www.ruby-forum.com/. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit https://groups.google.com/groups/opt_out.