let arr = [
{ areaId: 43, areaLevel: 0, areaName: "湖南" },
{ areaId: 4301, areaLevel: 1, areaName: '长沙' },
{ areaId: 430102, areaLevel: 2, areaName: '芙蓉' },
{ areaId: 430103, areaLevel: 2, areaName: '天心' },
{ areaId: 4303, areaLevel: 1, areaName: '湘潭' },
{ areaId: 430302, areaLevel: 2, areaName: '雨湖' },
{ areaId: 430304, areaLevel: 2, areaName: '岳塘' }
];
根据areaLevel 来过滤
想得到
let arr = [
{ areaId: 430102, province: "湖南", city: "长沙", area: "芙蓉" },
{ areaId: 430103, province: "湖南", city: "长沙", area: "天心" },
{ areaId: 430302, province: "湖南", city: "湘潭", area: "雨湖" },
{ areaId: 430304, province: "湖南", city: "湘潭", area: "岳塘" },
];
麻烦各位大佬帮忙看看