Kotlin - Modify nested Data (Add item to List in an Object in another List in an Object)
My User object has a List, each Post has a List.
Now I would like to add a Tag item to the List.
data class User(
val id: String,
val name: String,
val posts: List = listOf()
data class Post(
val id: Int,
val name: String
val tags: List = listOf()
Now I would like to update my MutableStateFlow containing the User object:
private val _userStateFlow: MutableStateFlow = MutableStateFlow(User())
val userStateFlow: StateFlow = _userStateFlow
To find the...