Bootstrap

java---json数组转数组

if(null != map.get("mdmDeptCode")){
                ObjectMapper objectMapper = new ObjectMapper();
                String[] array = objectMapper.readValue(map.get("mdmDeptCode").toString(), String[].class);

                if(0 < array.length){
                    map.put("mdmDeptCode2",array[0]);
                }else {
                    map.put("mdmDeptCode2",null);
                }

            }
;