ETL

in ita •  3 months ago 

export function transform(old: {[key: string]: string[]}) {
let expected: {[key: string]: number} = {};
for(const [keys, values] of Object.entries(old)){
for(const elm of values){
expected[elm.toLowerCase()] = Number(keys);
}
}
return expected;
}

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!