method

to_a

Importance_1
Ruby latest stable (v1_8_7_72) - 0 notes - Class: Hash
to_a() public

Converts hsh to a nested array of [ key, value ] arrays.

   h = { "c" => 300, "a" => 100, "d" => 400, "c" => 300  }
   h.to_a   #=> [["a", 100], ["c", 300], ["d", 400]]
Show source
Register or log in to add new notes.