Array value 값 가져오기

var companies = ["AAPL" : "Apple Inc", "GOOG" : "Google Inc", "AMZN" : "Amazon.com, Inc", "FB" : "Facebook Inc"]

for (key, value) in companies {
    println("\(key) -> \(value)")
}

//value값만 원할때
for value in companies.values.array {
    println("\(value)")
}


//한개의 value값만 원할때
println(companies["AAPL"])

results matching ""

    No results matching ""