Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

When I console print I get value of var a as Object{}, which is empty JSON Object Using jQuery how do I check for the empty value? Thank you.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
280 views
Welcome To Ask or Share your Answers For Others

1 Answer

Use the jQuery function:

jQuery.isEmptyObject( object )

More detailed description here: http://api.jquery.com/jQuery.isEmptyObject/

EDIT: As I always say... and insist on it. Rule number one of the programmer:

"Man pages are your best friend" or the one I was slapped with in school "F1 is there for a reason"


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...