编辑代码

//JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。 
// ------------------ 代码测试
//JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
console.log("数组合并");
const arr1 = [];
const arr2 = [];
const arr3 = arr1.concat(arr2);
console.log("数组合并结果");
console.log(JSON.stringify(arr3));


console.log("数组去重")
const data = [{"businessId":"75595f53-ed5e-48e8-9b79-636c3ce875d4","businessName":"城乡规划编制单位乙级资质认定"},{"businessId":"185f04a1-7a06-4bd5-afde-49d3ec609b78","businessName":"建设项目用地预审"},{"businessId":"dda18530-3abd-42ec-9f93-a005433fcbcc","businessName":"建设项目选址意见书核发"},{"businessId":"06807ac5-ed47-43bd-8632-55aed25b3144","businessName":"土地开垦区内开发未确定使用权的国有土地从事生产审查"},{"businessId":"b84e9b9f-ab0f-45b9-a12a-0d5cdf6949c9","businessName":"地质灾害治理工程监理单位资质审批"},{"businessId":"b522c192-fee0-43f3-965f-6c13346a3ec5","businessName":"地质灾害治理工程监理乙级资质审批"},{"businessId":"f8f1cb01-0983-4f0f-8532-3d6618d6e967","businessName":"地质灾害治理工程勘查单位资质审批"},{"businessId":"ece3ac80-a8ec-43c4-9718-df8a81436060","businessName":"地质灾害治理工程设计单位资质审批"},{"businessId":"be1b5bd0-3afa-48ab-9685-889ba0fafeea","businessName":"地质灾害治理工程施工单位资质审批"},{"businessId":"ca292e89-c0a8-4c58-b877-210d33d4c2f1","businessName":"地质灾害危险性评估单位资质审批"},{"businessId":"e49ab149-7a0a-4abc-b7ec-1eeb94b5b246","businessName":"采矿权延续登记"},{"businessId":"58646cf5-12ec-4835-a493-85bf64af7a96","businessName":"采矿权人名称变更登记"},{"businessId":"7880bcc5-48dd-41e5-9aac-cf6d12d6052e","businessName":"采矿权注销登记"},{"businessId":"2f3eefb6-8343-491e-8fe3-e9658dbf69fa","businessName":"扩大矿区范围变更登记"},{"businessId":"98b83062-3ae9-4a83-ba16-a6b8dfe7bb58","businessName":"缩小矿区范围变更登记"},{"businessId":"7f84e0e6-061a-42d4-8cc2-2f9f87c6bafc","businessName":"转让变更登记"},{"businessId":"1fc1d6f3-4b3b-4ebd-96bf-9d29549a05d0","businessName":"开采主矿种、开采方式变更登记"},{"businessId":"a3ffe6bc-1d8d-44fa-9705-5729550e7b20","businessName":"开采矿产资源划定矿区范围批准"},{"businessId":"6e56152e-e453-483a-8799-e98543aa0f2e","businessName":"开采矿产资源审批"},{"businessId":"37ba3925-aca7-4ffc-95c8-952481bbd679","businessName":"新设采矿权登记"},{"businessId":"87056f90-2512-41bc-94df-7efb83db957f","businessName":"新设探矿权登记"},{"businessId":"6b37c273-1422-4d37-aa27-a1ffe13b2274","businessName":"探矿权保留登记"},{"businessId":"f6b7b652-dcbb-4309-a113-88cb705d3004","businessName":"探矿权变更登记"},{"businessId":"b35d3d20-c4b0-4f7e-a58f-14f861b8fb3f","businessName":"探矿权延续登记"},{"businessId":"26e0d499-1755-42b0-9897-ea5f075e1ab3","businessName":"探矿权注销登记"},{"businessId":"0a0e8d11-c817-48a9-a502-1f1f6466b80c","businessName":"建设项目压覆重要矿床(矿产资源)审批"},{"businessId":"bd77d292-7d65-4935-a773-7ec2cf60b543","businessName":"建立相对独立的平面坐标系统审批(属于由自然资源部审批外其他情形的)"},{"businessId":"8ceb8b06-cfb8-445a-a553-4611567122f7","businessName":"矿山闭坑地质报告审批"},{"businessId":"641cd5ed-07c3-42e4-b7b5-cade62ada28a","businessName":"从事测绘活动的单位乙级、丙级、丁级测绘资质审批"},{"businessId":"99db117e-27b8-4ab0-ab44-9923c3b3a136","businessName":"一般保护古生物化石出境审批"},{"businessId":"71569a73-9211-4692-b2e8-22f4a7664278","businessName":"一般保护古生物化石发掘审批"},{"businessId":"15d5e609-b574-4bae-a646-15606884a1fb","businessName":"注册测绘师资格的注册审查"},{"businessId":"5923d82c-7a93-44a0-8b5b-6e136afb1f93","businessName":"地图审核"},{"businessId":"66d3e67e-6717-446b-8510-24d1989ce698","businessName":"法人或者其他组织需要利用属于国家秘密的基础测绘成果审批"},{"businessId":"17b4b374-d2be-4672-9695-d80c3c9cbcae","businessName":"政府投资的地质灾害治理工程竣工验收"},{"businessId":"6ab79eee-74f5-415c-ab8f-b2078d714471","businessName":"地质灾害治理责任认定"},{"businessId":"07ceb1d2-7d1b-4a59-b444-b7caf84e25fd","businessName":"矿产资源储量登记"},{"businessId":"1f2b482d-a1d7-476c-9f59-8850638d090a","businessName":"矿产资源储量评审备案(原名称:矿产资源储量评审备案与储量登记核准)"},{"businessId":"436d226f-f61f-450a-96a1-b97a01056ebc","businessName":"地质资料管理工作中作出突出贡献奖励"},{"businessId":"d08abfc0-063b-4c50-bebf-ca1b173bd2d9","businessName":"地质灾害防治工作中做出突出贡献奖励"},{"businessId":"9f11a136-a604-4f55-9e70-a9671825b571","businessName":"对勘查、开发、保护矿产资源和进行科学技术研究的奖励"},{"businessId":"4068d7b1-497c-464d-a667-75f2db198f7e","businessName":"对在古生物化石保护工作中做出突出成绩的单位和个人给与奖励"},{"businessId":"8e45203e-3147-40de-a6a9-b49de8a0af4a","businessName":"对测绘成果管理工作的奖励"},{"businessId":"2cb4e413-0200-48eb-8e42-dbb00888b2b1","businessName":"对测绘科学技术进步的奖励"},{"businessId":"2f9cd79d-e393-4eb6-8608-4bf752755856","businessName":"矿山地质环境保护与土地复垦方案审查"},{"businessId":"ad5300f8-d3ad-4525-bf88-bc00906af99a","businessName":"卫星导航定位基准站建设备案"},{"businessId":"124a00fd-e8e9-4b33-9b65-bd6446ec7b7d","businessName":"重要地理信息数据审核公布"},{"businessId":"8d32ed76-80c8-4523-a121-2e19acdd71ff","businessName":"测绘作业证办理"},{"businessId":"cb9f7082-d541-46a8-a325-c5d9e936ac3c","businessName":"测绘成果目录汇交"},{"businessId":"7489a0a6-d1ed-425b-bb93-a5c94c06417a","businessName":"抵押备案"},{"businessId":"96aaedd1-78b3-4261-b7ff-1f1ee474a40e","businessName":"抵押备案解除"},{"businessId":"7915ddf3-ac16-4004-9a38-7c579c9a15ce","businessName":"省级政府土地征收初审权"},{"businessId":"a4311fba-f2e5-4c3b-aa5f-450127675a21","businessName":"省级政府农用地转用初审权"},{"businessId":"d472a3b3-5a14-42e9-b260-71772834c388","businessName":"开采三类矿产资源和部分二类矿产资源采矿权人因矿区范围争议裁决"},{"businessId":"b53c6048-7dc0-4085-b608-8208dbd483ed","businessName":"开采三类矿产资源和部分二类矿产资源矿山地质环境治理项目验收"},{"businessId":"ef06df2f-7cbb-45e2-aea9-be2da2891edd","businessName":"矿山地质环境保护与治理的监督管理"},{"businessId":"a1cd6246-16a6-486e-a67f-dd20f8a3f170","businessName":"权限内地质灾害危险性评估、地质灾害治理工程勘查设计施工监理项目和资质备案"},{"businessId":"45f85e0a-2f2b-44f4-8bbe-13b8c5083d5a","businessName":"对非法采矿、破坏性采矿造成矿产资源破坏的价值鉴定"},{"businessId":"75595f53-ed5e-48e8-9b79-636c3ce875d4","businessName":"城乡规划编制单位乙级资质认定"},{"businessId":"ca292e89-c0a8-4c58-b877-210d33d4c2f1","businessName":"地质灾害危险性评估单位资质审批"},{"businessId":"f8f1cb01-0983-4f0f-8532-3d6618d6e967","businessName":"地质灾害治理工程勘查单位资质审批"},{"businessId":"ece3ac80-a8ec-43c4-9718-df8a81436060","businessName":"地质灾害治理工程设计单位资质审批"},{"businessId":"be1b5bd0-3afa-48ab-9685-889ba0fafeea","businessName":"地质灾害治理工程施工单位资质审批"},{"businessId":"b84e9b9f-ab0f-45b9-a12a-0d5cdf6949c9","businessName":"地质灾害治理工程监理单位资质审批"},{"businessId":"e49ab149-7a0a-4abc-b7ec-1eeb94b5b246","businessName":"采矿权延续登记"},{"businessId":"58646cf5-12ec-4835-a493-85bf64af7a96","businessName":"采矿权人名称变更登记"},{"businessId":"7880bcc5-48dd-41e5-9aac-cf6d12d6052e","businessName":"采矿权注销登记"},{"businessId":"185f04a1-7a06-4bd5-afde-49d3ec609b78","businessName":"建设项目用地预审"},{"businessId":"dda18530-3abd-42ec-9f93-a005433fcbcc","businessName":"建设项目选址意见书核发"},{"businessId":"0a0e8d11-c817-48a9-a502-1f1f6466b80c","businessName":"建设项目压覆重要矿床(矿产资源)审批"},{"businessId":"bd77d292-7d65-4935-a773-7ec2cf60b543","businessName":"建立相对独立的平面坐标系统审批(属于由自然资源部审批外其他情形的)"},{"businessId":"2f3eefb6-8343-491e-8fe3-e9658dbf69fa","businessName":"扩大矿区范围变更登记"},{"businessId":"1fc1d6f3-4b3b-4ebd-96bf-9d29549a05d0","businessName":"开采主矿种、开采方式变更登记"},{"businessId":"a3ffe6bc-1d8d-44fa-9705-5729550e7b20","businessName":"开采矿产资源划定矿区范围批准"},{"businessId":"6e56152e-e453-483a-8799-e98543aa0f2e","businessName":"开采矿产资源审批"},{"businessId":"2f9cd79d-e393-4eb6-8608-4bf752755856","businessName":"矿山地质环境保护与土地复垦方案审查"},{"businessId":"641cd5ed-07c3-42e4-b7b5-cade62ada28a","businessName":"从事测绘活动的单位乙级、丙级、丁级测绘资质审批"},{"businessId":"3a59f5c0-5c1a-421f-a132-961d45070f9a","businessName":"拆迁永久性测量标志或者使永久性测量标志失去使用效能审批"},{"businessId":"5923d82c-7a93-44a0-8b5b-6e136afb1f93","businessName":"地图审核"},{"businessId":"6ab79eee-74f5-415c-ab8f-b2078d714471","businessName":"地质灾害治理责任认定"},{"businessId":"d08abfc0-063b-4c50-bebf-ca1b173bd2d9","businessName":"地质灾害防治工作中做出突出贡献奖励"},{"businessId":"436d226f-f61f-450a-96a1-b97a01056ebc","businessName":"地质资料管理工作中作出突出贡献奖励"},{"businessId":"9f11a136-a604-4f55-9e70-a9671825b571","businessName":"对勘查、开发、保护矿产资源和进行科学技术研究的奖励"},{"businessId":"4068d7b1-497c-464d-a667-75f2db198f7e","businessName":"对在古生物化石保护工作中做出突出成绩的单位和个人给与奖励"},{"businessId":"8e45203e-3147-40de-a6a9-b49de8a0af4a","businessName":"对测绘成果管理工作的奖励"},{"businessId":"2cb4e413-0200-48eb-8e42-dbb00888b2b1","businessName":"对测绘科学技术进步的奖励"},{"businessId":"8d32ed76-80c8-4523-a121-2e19acdd71ff","businessName":"测绘作业证办理"},{"businessId":"cb9f7082-d541-46a8-a325-c5d9e936ac3c","businessName":"测绘成果目录汇交"},{"businessId":"7489a0a6-d1ed-425b-bb93-a5c94c06417a","businessName":"抵押备案"},{"businessId":"96aaedd1-78b3-4261-b7ff-1f1ee474a40e","businessName":"抵押备案解除"},{"businessId":"66d3e67e-6717-446b-8510-24d1989ce698","businessName":"法人或者其他组织需要利用属于国家秘密的基础测绘成果审批"},{"businessId":"ad5300f8-d3ad-4525-bf88-bc00906af99a","businessName":"卫星导航定位基准站建设备案"},{"businessId":"7915ddf3-ac16-4004-9a38-7c579c9a15ce","businessName":"省级政府土地征收初审权"},{"businessId":"a4311fba-f2e5-4c3b-aa5f-450127675a21","businessName":"省级政府农用地转用初审权"},{"businessId":"0c8d5ec4-39bf-496d-b9a2-595d68707b55","businessName":"无偿提供基础测绘成果的给付"},{"businessId":"a1cd6246-16a6-486e-a67f-dd20f8a3f170","businessName":"权限内地质灾害危险性评估、地质灾害治理工程勘查设计施工监理项目和资质备案"},{"businessId":"d472a3b3-5a14-42e9-b260-71772834c388","businessName":"开采三类矿产资源和部分二类矿产资源采矿权人因矿区范围争议裁决"},{"businessId":"b53c6048-7dc0-4085-b608-8208dbd483ed","businessName":"开采三类矿产资源和部分二类矿产资源矿山地质环境治理项目验收"}];

const uniqueData = arr3.reduce((acc, current) => {
  const exists = acc.find(item => item.businessId === current.businessId && item.businessName === current.businessName);
  if (!exists) {
    acc.push(current);
  }
  return acc;
}, []);

console.log("数组去重结果");
console.log(JSON.stringify(uniqueData));