0

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.

dmahapatro
  • 49,365
  • 7
  • 88
  • 117
monal86
  • 433
  • 2
  • 11
  • 26

1 Answers1

8

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"

Udan
  • 5,429
  • 2
  • 28
  • 34