Just a quick update, been messing around with the code and I think I’m halfway there:
Command:
‘$(eval m=$(urlfetch json https://api.tracker.gg/api/v1/warzone/matches/battlenet/Scop3s%232625/).data.matches; tt=“09-01”; t=m[0].metadata.timestamp.substring(5,10); k=d=r=w=0;p=[];for(i=0;i<20;i++){y=m[i].metadata; s=m[i].segments[0].stats; p.push(y.mapName,y.timestamp.substring(5,10),s.placement.value);}p.forEach(e=>e==1?w++:``);Time: ${tt} | Times2 ${w} I ${i} K ${k} P ${p}
;)’
Nightbot returns:
Time: 09-01 | Times2 7 I 20 K 0 P Rebirth Island,09-02,7,Rebirth Island,09-02,1,Rebirth Island,09-02,5,Verdansk,09-01,14,Verdansk,09-01,10,Verdansk,09-01,28,Verdansk,09-01,12,Verdansk,09-01,1,Verdansk,09-01,3,Verdansk,09-01,2,Verdansk,09-01,1,Verdansk,09-01,36,Verdansk,09-01,1,Verdansk,09-01,6,Verdansk,09-01,1,Verdansk,09-01,1,Verdansk,09-01,1,Verdansk,09-01,28,Verdansk,09-01,62,Verdansk,08-31,2
The first few values are just for me to check stuff. What I’m most interested in is the list of the 20 matches with mapName, “date”, and placement. I want to count only the ones that are Verdansk, 09-01, 1. I’m still having trouble figuring out how to use “forEeach”. Any help would be greatly appreciated