diff --git a/index.mjs b/index.mjs index c2b1a0f..25e1b8a 100644 --- a/index.mjs +++ b/index.mjs @@ -59,7 +59,26 @@ for (const matchId of commonGameIds) { } console.log(`Common Game Data Found: ${commonGameIds.length}`); -console.log(`${JSON.stringify(commonGames[0], null, " ")}`); + +commonGames.reverse(); + +commonGames + .map(({ info, metadata }) => ({ + id: metadata.matchId, + data: info.participants + .filter(({ puuid }) => puuid === ice.puuid || puuid === val.puuid) + .map(({ championId, championName, summonerName, lane }) => ({ + championId, + championName, + summonerName, + lane, + })), + })) + // .filter(({ data }) => { + // const lanes = data.map((s) => s.lane); + // return lanes.includes("BOTTOM") && lanes.includes("SUPPORT"); + // }) + .forEach((g) => console.log(g)); /** * @param {string} puuid