JavaScript Object.keys() method alternative for compatibility with IE8

Viewed 18383

I'm getting in error when testing in IE8 that the Object method is not supported. I'm using Object.keys()

Object.keys(jsoncont).sort(function(a,b){
   return b.localeCompare(a)
 }).forEach(function(key) {
    var val = jsoncont[key];

   /* My code here */
 });
}

Is there a good workaround for this method that is supported by IE8?

3 Answers
Related