let treeData = [
{ LINEID: '01', LINENAME: "1号线" },
{ STATIONID: '02', STATIONNAME: "2号线" }
];
let data2 = [];
treeData.forEach((item) => {
data2.push({ name: item.LINENAME || item.STATIONNAME, value: item.LINEID || item.STATIONID });
});
let treeData = [
{ LINEID: '01', LINENAME: "1号线" },
{ STATIONID: '02', STATIONNAME: "2号线" }
];
let data2 = [];
treeData.forEach((item) => {
data2.push({ name: item.LINENAME || item.STATIONNAME, value: item.LINEID || item.STATIONID });
});