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.

Comments

Popular posts from this blog

AWS encryption chart (SSE-S3 vs SSE-KMS vs SSE-C)

Is Wharton Business Foundations Specialization Good?

Sending Large Data with JSON