Hash Sorting

Ruby

Create two methods:

  1. sort_by_first_name
  2. sort_by_first_name_and_age

Both methods will accept an array of hashes as a param with the key/pair data values of: name => string, last_name => string, age => int

Return the sorted hash as the output.

def sort_by_first_name(arr) end def sort_by_first_name_and_age(arr) end
< >