Solución
solution.tsTypeScript
function filterProperties(obj: Record<string, unknown>, keys: string[]): Record<string, unknown> {
return Object.fromEntries(
Object.entries(obj).filter(([ob])=> keys.includes(ob) )
);
}
export { filterProperties };0respuestas