Retorne as chaves e os valores do objeto

Crie uma função que receba um objeto e retorne as chaves e os valores como arrays separados. Retorne as chaves ordenadas alfabeticamente e seus valores correspondentes na mesma ordem.

Exemplos

keysAndValues(array("a" => 1, "b" => 2, "c" => 3 ))
➞ [["a", "b", "c"], [1, 2, 3]]

keysAndValues(array("a" => "Apple", "b" => "Microsoft", "c" => "Google" ))
➞ [["a", "b", "c"], ["Apple", "Microsoft", "Google"]]

keysAndValues(array("key1" => true, "key2" => false, "key3" => "undefined" ))
➞ [["key1", "key2", "key3"], [true, false, "undefined"]]

Observações

Lembre-se de ordenar as chaves.