Object.keys do not work on older versions of IE
I was using Object.keys(keyValuePairs).length in order to access number of keys on keyValuePairs but it turned out this does not work on older version of IE. Therefore you should not access the number of keys via Object.keys if you want to support old versions of IE.
If you are using Underscore library, you can use _.size(keyValuePairs) which returns the number of keys in the keyValuePairs.
If you are using Underscore library, you can use _.size(keyValuePairs) which returns the number of keys in the keyValuePairs.
Comments