I have this object:
let obj = {
matrimonyUrl: 'christian-grooms',
search_criteria:
'a:2:{s:6:"gender";s:4:"Male";s:9:"community";s:9:"Christian";}',
mothertongue: null,
religion: 'Christian',
caste: '',
country: null
};
I need to remove all key/value pairs in this object where the value is blank i.e. ''
So the caste: ''
property should be removed in the above case.
I have tried:
R.omit(R.mapObjIndexed((val, key, obj) => val === ''))(obj);
But this doesn't do anything. reject
doesn't work either. What am I doing wrong?