3
var myCountry:String?
var myCity:String?
var myBodyType:String?
var myOrientation:String?
var myRelationship:String?
我需要從這個數據建立一個字典變量,但是myCountry和myCity我想在一個關鍵字「region」下合併。我試過了:Swift什麼是正確的字典語法?
var myData = ["region":["country":myCountry,"city":myCity],"bodyType":myBodyType,"orientation":myOrientation,"relationship":myRelationship]
它錯了。這個怎麼做?