v = {a:1, b:2, c:3, d:4} p v.keys # => [:a, :b, :c, :d] p v.values # => [1, 2, 3, 4] Register as a new user and use Qiita more conveniently You get articles that match your needsYou can efficiently read back useful informationYou can use dark themeWhat you can do with signing up