As in JavaScript, everything is an object so for falsy and empty, I use the below condition:
if(value && Object.keys(value).length){ // Not falsy and not empty}else{ // falsy or empty array/object}
As in JavaScript, everything is an object so for falsy and empty, I use the below condition:
if(value && Object.keys(value).length){ // Not falsy and not empty}else{ // falsy or empty array/object}