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.
- {
- Sales %: "7.26%"
- Location: "India"
- }
So how we will do that?
We have a fu8nction called
- Object.keys(entry).length
The above code will return 2.
Here entry is my object.