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