1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
export interface Skill { name: string xp: number } export function cleanSkills(data: any): Skill[] { const skills: Skill[] = [] for (const item in data) { if (item.startsWith('experience_skill_')) { const skillName = item.substr('experience_skill_'.length) const skillValue = data[item] skills.push({ name: skillName, xp: skillValue }) } } return skills }