check if the value of a key is empty javascript code example
Example 1: js check if object is empty
> !!Object.keys(obj).length;
Example 2: es6 check if the object is empty
Object.entries(objectToCheck).length === 0
> !!Object.keys(obj).length;
Object.entries(objectToCheck).length === 0