18 Jul 17:17
create an array from a hash that includes key and value
From: paco.onrails <pacoreyesp@...>
Subject: create an array from a hash that includes key and value
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-18 15:19:52 GMT
Subject: create an array from a hash that includes key and value
Newsgroups: gmane.comp.lang.ruby.rails
Date: 2008-07-18 15:19:52 GMT
Hello there, I have the hash:
@hash = {"a"=>"1", "b"=>"2", "c"=>"3"}
And I need to create an array:
@array = [ ['a','1'],['b','2'],['c','3'] ]
How do I do that?
Paco Reyes
--~--~---------~--~----~------------~-------~--~----~
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@...
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@...
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
RSS Feed