let\'s have this hash:
hash = {\"a\" => 1, \"b\" => {\"c\" => 3}} hash.get_all_keys => [\"a\", \"b\", \"c\"]
how can i get all key
def get_all_keys(hash) hash.map do |k, v| Hash === v ? [k, get_all_keys(v)] : [k] end.flatten end