does anyone know how I can add a element to the `n...
# announcements
v
does anyone know how I can add a element to the
notes
array in the following json object?
Copy code
val msg = json { obj( "a" to "b", "notes" to array() ) }
Also asked this in Klaxon, but don’t know if that channel is too active
a
In order to add element to a collection, the collection should be mutable, you could use
mutableListOf<Type>()
instead of array if you want to add elements later on at runtime.
v
I see, am switching over, thanks