SOURCE

var jsonStr = '[{"id":"01","open":false,"pId":"0","name":"A部门"},{"id":"01","open":false,"pId":"0","name":"A部门"},{"id":"011","open":false,"pId":"01","name":"A部门"},{"id":"03","open":false,"pId":"0","name":"A部门"},{"id":"04","open":false,"pId":"0","name":"A部门"}, {"id":"05","open":false,"pId":"0","name":"A部门"}, {"id":"06","open":false,"pId":"0","name":"A部门"}]';
var jsonObj = JSON.parse(jsonStr);//转换为json对象
 var aa=[];
for (var i = 0; i < jsonObj.length; i++) {
   aa.push(jsonObj[i].id);  //取json中的值
}
console.log(aa);
console.log(jsonObj);
var jsonStr1 = JSON.stringify(jsonObj);
console.log(jsonStr1 + "jsonStr1");
console 命令行工具 X clear

                    
>
console