When I was trying to parse a json array, the studio gave me a compilation error stating foreach is not applicable for json array. Although
Because JSONArrayclass doesn't implement Iterable interface.
JSONArray
Iterable