I have an object where some fields have a value of null or undefined.
Is there a nice quick way to change these values to an empty string '' using Javascript or Lodash?
Example input:
{
a: '23',
b: 'Red',
c: null,
}
Example output:
{
a: '23',
b: 'Red',
c: '',
}
NOTE: I do NOT want to remove these fields with values of null or undefined, I want to keep them in the object but change their values to the empty string ''
Thanks