var object = [{key1:'value',key2:'value2'},{'key1:'value',key2:'value2}]
for (var key in object)
{
if(!object.hasOwnProperty(key)){continue;}
Why do we get error? Am i checking the right way.
I get an error cannot call hasOwnProperty in an Object - TypeError
objectis not defined. Check this revision: