I've got a model that resembles the response from the back end, which looks something like this
public enum Numbers: String, Codable {
case one = "one"
case two = "two"
case three = "three"
}
public init(numbers: [Numbers]) {
self.numbers = Numbers
}
I'm trying to extract Numbers and convert it to an array of string like this
public var numbers: Array<String> {
return NumbersResponse.numbers
}
but I keep getting this error:
Cannot convert return expression of type '[NumbersResponse.numbers]' to return type 'Array'
I've tried using a map as well but no luck.*