fun <T> T.toObj(serializer: SerializationStrategy<T>): dynamic
An extension function to convert Serializable object to JS dynamic object
serializer - a serializer for T
serializer