Convert a hash into an array. Nothing more, Nothing less.

```
{name: 'Jeremy', age: 24, role: 'Software Engineer'}
```
should be converted into

```
[["name", "Jeremy"], ["age", 24], ["role", "Software Engineer"]]
```

```if:python,javascript,crystal
**Note**: The output array should be sorted alphabetically.
```

Good Luck!

Difficulty: EASY
Starter code: def convert_hash_to_array(hash):
	

Solutions:
def convert_hash_to_array(hash):
	return sorted(map(list, hash.items()))


def convert_hash_to_array(hash):
	return [[k, hash[k]] for k in sorted(hash)]


def convert_hash_to_array(d):
	return [[k, v] for (k, v) in sorted(d.items())]


def convert_hash_to_array(dct):
	return sorted((list(item) for item in dct.items()))


def convert_hash_to_array(hash):
	return sorted((list(x) for x in hash.items()))


def convert_hash_to_array(hash):
	return sorted(map(list, hash.items()))

def convert_hash_to_array(hash):
	return sorted(([k, v] for (k, v) in hash.items()))

def convert_hash_to_array(hash):
	return [[k, hash[k]] for k in sorted(hash)]


def convert_hash_to_array(hash):
	dictlist = []
	for (key, value) in hash.items():
		temp = [key, value]
		dictlist.append(temp)
	return sorted(dictlist)


convert_hash_to_array = lambda l: [[a, l[a]] for a in sorted(l)]


def convert_hash_to_array(hash):
	my_list = []
	for k in sorted(hash.items()):
		temp = [k[0], k[1]]
		my_list.append(temp)
	return my_list


def convert_hash_to_array(hash):
	return sorted([[att, hash[att]] for att in hash])