From 82bc3316883ec7ad9dbad7cb59effd80076eab7d Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Thu, 8 Feb 2024 05:09:31 -0800 Subject: [PATCH] more work --- index.mjs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) 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