我正在检索单击详细 View 时按 objectID 存储的“已读消息”列表。现在我正尝试从数组中检索这些 objectID,如下所示:
JSONArray myArray = ParseUser.getCurrentUser().getJSONArray("read_messages");
但是我如何遍历该数组中的每个字符串,例如在控制台中记录每个字符串?
最佳答案
But how would I iterate through each string in that array for example Log each one in the console?
然后使用循环,例如
for (int i = 0; i < myArray.length(); i++) {
Log.i("TEST", " " + myArray.optString(i));
}
关于android - 遍历 Parse JsonArray,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31414339/