forEach

inline fun JSONArray.forEach(action: (Any) -> Unit)

Extension function for JSONArray to iterate over each element.

Parameters

action

A lambda function to be executed for each element in the JSONArray.