Siratinee Sukachai wrote in post #993714:
> I am a newbie but I'm familial with C#.
> I can't find any dictionary class in Ruby.
> I need to do like Dictionary<key, List<string>>
>
> Can I do that in Ruby? If yes, how?
> Big thanks!

my_hash = {
  'fruits'  => ['apple', 'pear'],
  'cars'    => ['VW', 'BMW', 'Ford']
}

p my_hash['cars']

--output:--
["VW", "BMW", "Ford"]


my_hash['rocks'] = ['granite', 'quartzite']
p my_hash

--output:--
{"fruits"=>["apple", "pear"], "cars"=>["VW", "BMW", "Ford"], 
"rocks"=>["granite", "quartzite"]}

-- 
Posted via http://www.ruby-forum.com/.