So I have an API route that returns a JSON array of objects. For example:
[ {\"firstname\": \"Tom\", \"lastname\": \"Smith\", \"age\": 31}, {\"firstname\
to decode to array, you've your response in a type alias for clarity:
typealias ServiceResponseObject = [ResponseObject]
but then you'll have to confirm Array to codable:
extension Array: Decodable where Element: Decodable {}
that should make it all work.