json数据如下:
{
"code": 200,
"msg": "OK",
"data": [
"3148120404262382",
"1443363211304208",
"4322133941384257",
"225715105299077",
"0130535842122221",
"013132461720341",
"084219211914673",
"31403355245740",
"195004336186346",
"15684966047044",
"025013120824041"
]
}
代码
String[]useridArray=JSONObject.parseObject(UserApi.getDeptMember(Execution.getAccessToken(), deptId), JSONObject.class).getJSONArray("userIds").toArray(new String[0]);
其中UserApi.getDeptUserSimpleList(Execution.getAccessToken(), deptId)是得到的json数据。使用的时候换成自己的