Find object length in jquery

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.
[js]
{
Sales %: "7.26%"
Location: "India"
}
[/js]

So how we will do that?
We have a function called
[js]
Object.keys(entry).length
[/js]

The above code will return 2.

Here entry is my object.

Leave a Reply

Your email address will not be published. Required fields are marked *

Serverless 360