I need to get the generic type of an array.
I have an object that is an Array<Decodable>, but I am not guaranteed that the generic type is always Decodable. I know I can get the type of the thing by saying array.self.dynamicType to get the Array.Type, but I need something like array.generic.self.dynamicType to get Decodable.Type. How would I do this?
Array.Typeto print?print([1, 2, 3].dynamicType)yieldsArray<Int>, not justArray. If you expect quality answers, you'll have to give use a more concrete, minimal, complete, and verifiable example.