Javascript: how to check empty object in an array?

Viewed 29734

I am getting an array of objects from my JSON response. Sometimes I am getting an array of length 1 with an empty object. How do I check that condition?

I tried with a few things-

  myarray[0]=='empty' || myarray[0] == 'undefined'
  or myarray.indexOf(0)== -1

But didn't solved the problem

2 Answers
Related