Skip to content

Instantly share code, notes, and snippets.

@hpr
Created November 2, 2023 17:12
Show Gist options
  • Save hpr/eb775ea0dc78151a33ca0b3466a2d5f0 to your computer and use it in GitHub Desktop.
Save hpr/eb775ea0dc78151a33ca0b3466a2d5f0 to your computer and use it in GitHub Desktop.
Object.entries(bindings.reduce((acc, o) => {
const qid = o.item.value.split('/').at(-1);
acc[qid] ??= [];
acc[qid].push({
qid,
namedAs: o.subject_named_as.value,
id: o.id.value,
});
return acc;
}, {})).map(([qid, arr]) => `${qid}:\n` + arr.map(o => `- https://worldathletics.org/athletes/_/${o.id} (${o.namedAs})`).join('\n')).join('\n')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment