function isEmptyObject(obj) {
if ((typeof obj === “object” && !(obj instanceof Array)) || ((obj instanceof Array) && obj.length <= 0)) {
var isEmpty = true;
for (var prop in obj) {
isEmpty = false;
break;
}
return isEmpty;
}
return false;
}