goes through jSONArray to get returned information for each picture