Consider below is my Json Object, now I need to know the length of this object. In array we can use the length property, but for object it does not support. So how we will do that? We have a function called The above code will return 2. Here entry is my object.