mapNotNull

fun <T> JSONArray.mapNotNull(block: (JSONObject) -> T?): List<T>(source)

Maps a JSONArray by the block function excluding null values