In my application I want to create an generic method which creates an array of object depening on the given type T.
I created the following function:
fun
You should be able to indicate the type with the as keyword: object.getArray("key") as Document[].
as
object.getArray("key") as Document[]