radhames brito wrote:
> i hash inside a hash i read it list[:outer_value][:deeper_value] and
> you
> can do
>
> list.each do |key,value|
> if value.class == 'Hash'
> puts "values for key #{ key}"
> value.each do | key2,value2|
> puts "key: #{key2} and value: #{value2}"
> end
> else
> puts "key: #{key} and value: #{value}"
> end
> end
>
Perfect. Thanks.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.