I have a problems, I don't work with keys in general, but I got this problem now, I have an object like this :
let A = {
'a': null;
'b': null,
'c': null,
'd': { isOk : 'Yes' },
'e': { isOk : 'No' },
'f': { label : 'field'}
}
I want to filter this object and throw the nulls, I want a result like this :
{
'd': { isOk : 'Yes' },
'e': { isOk : 'No' },
'f': { label : 'field'}
}
I can't verify one by one, because keys are dynamic, I can't use map or for on an object
I am trying to just transform this into array so I can use filter method after, but did not make it :
console.log(
pipe(
toPairs,
map(
([id, props]) => ({
id,
...props,
}),
A,
),
),
);
Any help ?