I have to merge two objects but I don't want to assign undefined value to defined values.
A = { activity: 'purchased', count: undefined, time: '09:05:33' }
B = { activity: 'purchased', count: '51', time: undefined }
When I try Object.assign, undefined is replacing fields that have values.
What I want
C = { activity: 'purchased', count: '51', time: '09:05:33' }