convertObject

fun convertObject(obj: Any?): Any?

Converts an object to another type based on its structure and contents.

Return

The converted object or null if the input object is null or cannot be converted.

Parameters

obj

The object to be converted. Can be of any type.