I have this script to target the last game inside an array.
const lastMatch = league.data.schedule.events.pop();
But that pops the last game, which I understand why. I actually want to target the games that are 'completed'.
I tried
const lastMatch = league.data.schedule.events.state('completed');