Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

How to check JSON object or JS object is empty? | AEM Community Blog Seeding

Avatar

Administrator

17-08-2022

BlogImage.jpg

How to check JSON object or JS object is empty? by Rashid jorvee

Abstract

if (!Object.keys(jsonObj).length === 0) {
console.log("JSON object have some keys and values");
} else {
console.log("JSON object is empty");
}


Here jsonObj is JSON or JavaScript object.

Read Full Blog

How to check JSON object or JS object is empty?

Q&A

Please use this thread to ask the related questions.