0
如何快速獲取數組類型字典的鍵。我想輸出作爲 LOCATION1,LOCATION2,LOCATION3如何快速獲取數組類型字典的鍵
//我的代碼如下
class ViewController: UIViewController
{
var data = [NSDictionary]()
var LocationPickerData:[String] = ["Mozzarella","Gorgonzola","Provolone","Brie","Maytag Blue","Sharp Cheddar","Monterrey Jack","Stilton","Gouda","Goat Cheese", "Asiago"]
var LocationPickerData2 = ["Mozzarella","Gorgonzola","Provolone","Brie","Maytag Blue","Sharp Cheddar","Monterrey Jack","Stilton","Gouda","Goat Cheese", "Asiago"]
var LocationPickerData3 = ["Mozzarella","Gorgonzola","Provolone","Brie","Maytag Blue","Sharp Cheddar","Monterrey Jack","Stilton","Gouda","Goat Cheese", "Asiago"]
override func viewDidLoad() {
super.viewDidLoad()
data = [["lacation1":LocationPickerData],["location2":LocationPickerData2],["location2":LocationPickerData3]]
print(data[keys])
}
}