typescript remove undefined values to object code example
Example: remove undefined values from object javascript
var obj = { a: 1, b: undefined, c: 3 }
console.log(JSON.parse(JSON.stringify(obj)));
Output: {a: 1, c: 3}
var obj = { a: 1, b: undefined, c: 3 }
console.log(JSON.parse(JSON.stringify(obj)));
Output: {a: 1, c: 3}