Here is the solution!
If your problem is old browsers / IE, you can use sophisticated Amazon solution which will make the functionality available in most of the older browsers /IE:
Here by passing an object to this function you will get back an array of Object property keys and of-course you can get the length from it like a simple array as well!
As you see it is a super simple and very short function!
See you later, mim, 😉