forEachIndexed

fun JSONArray.forEachIndexed(block: (value: Any, index: Int) -> Unit)

Utility function to allow forEach with index iteration on a JSONArray