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");
            }
        });

 

posted on 2019-04-18 16:31  落忆无痕  阅读(5395)  评论(0编辑  收藏  举报

导航