how to check if value of an object are empty string code example
Example 1: how to check if a javascript object is empty
function isEmpty(obj) { return Object.keys(obj).length === 0;}
Example 2: javascript check if object is null or empty
if (typeof value !== 'undefined' && value) {
//deal with value'
};