Solución
solution.tsTypeScript
export function decodePairs(data: string, key: string, defaultValue: string): string {
let res = {}
data.split(";").forEach((v) => {
const keyG = v.split("=")[0]
if(!res[keyG]) res[keyG] = v.split("=")[1]
})
return res[key] || defaultValue ;
}0respuestas