How to change "val" values in an object withotu changing the definition to "var"?
I have a complex Kotlin data class, say something like this:
data class Post(
val message: Message,
val dateAndTime: LocalTime,
val postAuthor: Author?,
val visitorsVisitedTimes: List
and each of Message, LocalTime, ... are different data classes.
I have an object of above Post data class. I want to parse it, access visitorsVisitedTimes field value, for each pair, replace Author object with corresponding postAuthor. I have to make similar changes in the Message object as...