Mostly web development
© 2018. All rights reserved.
example_hash = { '003' => 'Royal Bank of Canada', '265' => 'Deutsche Bank AG', '314' => 'JP Morgan Bank Canada', '354' => 'Jameson Bank' }Hash[ example_hash.keys.map(&:to_i).zip(example_hash.values) ]OUTPUT:{3=>"Royal Bank of Canada", 265=>"Deutsche Bank AG", 314=>"JP Morgan Bank Canada", 354=>"Jameson Bank"}