Files
www/scripts/parse-and-sort-data.ts
2025-04-03 20:21:05 +02:00

12 lines
306 B
TypeScript

// @ts-nocheck
const data = await fetch(
'https://api.neatqueue.com/api/history/1226193436521267223'
).then((res) => res.json())
const parsed_and_sorted = data.data.toSorted((a, b) => {
return a.game_num - b.game_num
})
await Bun.write('./src/data.json', JSON.stringify(parsed_and_sorted, null, 2))