{
"Gender": "male",
"SiteId": -99,
"LastName": "Bobby",
"BirthDate": "2000-01-15T06:00:00.000Z",
"FirstName": "Ricky",
"HomeLocation": {},
"ClientCreditCard": {},
"CustomClientFields": {}
}
I've tried a few options I found here, but can't seem to understand what I'm doing wrong. I've tried:
let o = Object.keys(obj)
.filter((k) => obj[k] != null)
.reduce((a, k) => ({ ...a, [k]: obj[k] }), {});
and
var output = JSON.parse(JSON.stringify(obj));
Also, any recommended courses that focus on data manipulation for arrays/objects would be appreciated!