I am having problems using strings in switch statements in Swift.
I have a dictionary called opts which is declared as
opts
Try using:
let str:String = opts["type"] as String switch str { case "abc": println("Type is abc") case "def": println("Type is def") default: println("Type is something else") }