Remove optionals on accessing GraphJSON properties
OrkhanAlikhanov opened this issue · comments
Orkhan Alikhanov commented
let json = GraphJSON(...)
guard let firstName = json.user?.name?.first?.asString else {
return
}
Above can be reduced to:
guard let firstName = json.user.name.first.asString else {
return
}
We can continue to use asX
anyways which returns Optional
Daniel Jonathan commented
Fixed in #146