if (response instanceof JSONObject) {
JSONObject object = (JSONObject) response;
if (object.get("error") != null) {
throw new RedditError("Comments response contained error code " + object.get("error") + ".");
}
JSONArray array = (JSONArray) ((JSONObject) object.get("data")).get("children");
// Iterate over the submission results