Object.entries(obj).reduce((a,[k,v]) => (v == null ? a : (a[k]=v, a)), {})
removeEmpty(obj: any): any {
return Object.fromEntries(
Object.entries(obj)
.filter(([_, v]) => v != null)
.map(([k, v]) => [k, v === Object(v) ? this.removeEmpty(v) : v])
);
}