What is the syntax for sorting an array alphabetically by the key of a hash or by a string? I would like to sort the following:
['bob', 'apple', 'sandwich', {'lasagne' => 'munch'}, 'tangoed']
to give the following:
['apple', 'bob', {'lasagne' => 'munch'}, 'sandwich', 'tangoed']