Hi. Is there a way to convert a `Map<String, *&...
# javascript
f
Hi. Is there a way to convert a
Map<String, *>
to a JS native (nested) object, where the map values can be other similar maps, lists, or primitive types?
t
You can use
recordOf
function from Kotlin Wrappers
f
Thanks. This one: https://github.com/JetBrains/kotlin-wrappers/blob/ffd6d2937e81b60cab6f20d34fcc084942004dc9/kotlin-js/src/jsMain/kotlin/js/core/recordOf.kt ? I need the conversion process to be recursive, i.e., also convert the values in the map, which can be other maps or lists.
t
You can use
Recaord
factory method in that case
Both options can be used
f
Where is that factory method?
t
f
Thanks.
­čÖé 1