jsonarray 循环

JSONArray groupList = JSON.parseArray(st1);
        for (int i=0;i<groupList.size();i++){
            JSONObject json = groupList.getJSONObject(i);
            System.out.print(i+"---------"+json) ;
        }
groupList.stream().forEach(x->{
            JSONObject y=(JSONObject) x;
            System.out.println(y.toJSONString());
            if (y.getString(mobile).equals(mobile)){
                System.out.println("xxx");
            }
        });
原文地址:https://www.cnblogs.com/jasonlam/p/10730471.html