新浦京娱乐场官网Access array embedded within a hash

2019-06-19 20:04栏目:技术创新
TAG: 澳门XPJ

people = {
  'fred' => {
    'name' => 'F',
    'age' => 63,
    'gender' => 'male',
    'favorite painters' => ['A', 'B', 'C']
  },
  'janet' => {
    'name' => 'J',
    'age' => 55,
    'gender' => 'female'
  }
}

puts people['fred']['favorite painters'].length
puts people['fred']['favorite painters'].join(', ')

版权声明:本文由新浦京娱乐站_新浦京娱乐场官网_新浦京娱乐发布于技术创新,转载请注明出处:新浦京娱乐场官网Access array embedded within a hash