map
inline fun <T, K> <Error class: unknown class>.map(transform: (<Error class: unknown class>, Int) -> T = { json, i -> getJsonObjFromArray(json, i) }, action: (T) -> K): List<K>
Usage:
jsonArray.map<String> { obj -> doSomething(obj) }
Content copied to clipboard
Optionally, you can specify a transform function to manually convert the object to type T
.
Since
0.46.0