I've this code that I made on playground to represent my problem:
import Foundation
var countries = ["Poland":["Warsaw":"foo"],"England":["London":"foo"]]
for (country, city) in countries {
if city["London"] != nil {
city["London"] = "Piccadilly Circus" // error because by default the variables [country and city] are constants (let)
}
}
Does anyone know a work around or the best way to make this work?
See Question&Answers more detail:os