这是我的代码:
var keys: [String:String] = ["id": "ID", "domain": "Domain", "bundled_domain": "Bundled Domain", "dns": "DNS", "registrar": "Registrar", "registrar_url": "Registrar URL", "sponsoring_registrar": "Sponsoring Registrar", "created": "Created", "updated": "Updated", "expires": "Expires", "whois_server": "Whois Server", "status": "Status"]
for (key, name) in keys{
println(key)
}
但结果并没有按照字典的顺序排序:那么我该如何让我的for循环按照字典的顺序进行?谢谢!