javascript object is not blank code example
Example 1: how to check if a javascript object is empty
function isEmpty(obj) { return Object.keys(obj).length === 0;}
Example 2: check if js object is empty
JSON.stringify({}) !== '{}';
function isEmpty(obj) { return Object.keys(obj).length === 0;}
JSON.stringify({}) !== '{}';