import year from '../.vscode/helper/year.job.json' with { type: 'json' }; import event from '../.vscode/helper/event.job.json' with { type: 'json' }; let file; let fromYear = []; let fromEvent = []; let fromYearEventPresent = []; let fromEventYearPresent = []; const pathA = 'L:/Git/AA/.vscode/helper/from-year-event-present.json'; const pathB = 'L:/Git/AA/.vscode/helper/from-event-year-present.json'; year.Files.forEach(element => { file = element.RelativePath.split('\\')[1]; fromYear.push(file); }); event.Files.forEach(element => { file = element.RelativePath.split('\\')[1]; fromEvent.push(file); if (fromYear.includes(file)){ fromYearEventPresent.push(file); } }); year.Files.forEach(element => { file = element.RelativePath.split('\\')[1]; if (fromEvent.includes(file)){ fromEventYearPresent.push(file); }; }); const jsonA = JSON.stringify(fromYearEventPresent); await Bun.write(pathA, jsonA); const jsonB = JSON.stringify(fromEventYearPresent); await Bun.write(pathB, jsonB);