I'm new to Swift and find out that Swift has optional string. I have issue unwrapping this optional. Here's the exmple:
for row in try database.prepare("SELECT name FROM airline WHERE carrier_id = \"\(text2)\"") {
print(row)
}
Results:
[Optional("Lion Air")]
[Optional("Malindo Air")]
I tried:
if let a = row {
print(a)
}
but it shows the error:
'Statement.Element' (aka 'Array<Optional<Binding>>')
How can I unwrap that array string and just leave as string as usual?