How to check Object is empty or not in Jquery/JavaScript ?

By Hardik Savani | January 9, 2016 | Category : PHP Javascript jQuery

you can check your JavaScript OR jQuery object is empty or not, because we need to check many place our jQuery object is empty, null or undefined etc., So usually, we can check using $.isEmptyObject() as i explained as under.

how to check empty object in javascript, how to check empty object in jquery, jQuery.isEmptyObject() example, jquery check object is null, jquery check object is empty, jquery check object is empty or not, how to check json object is empty or not in jquery, check if json object is empty jquery


alert("This Object is empty.");


alert("This Object is not empty.");


you can also check other way to your object is empty or not i also describe under.

if (your_object && your_object instanceof Array && !your_object.length) {

console.log('This Object is empty.');

} else {

console.log('This Object is not empty.');


Tye this...

Hardik Savani
My name is Hardik Savani. I'm a full-stack developer, entrepreneur and owner of Aatman Infotech. I live in India and I love to write tutorials and tips that can help to other artisan. I am a big fan of PHP, Javascript, JQuery, Laravel, Codeigniter, VueJS, AngularJS and Bootstrap from the early stage.
Follow Me: Github Twitter
***Do you want me hire for your Project Work? Then Contact US.