I have this piece of code in Javascript / Angular :
 $scope.validCredentials = {            
        'a@a.it': 'aaa',
        'b@b.com' : 'bbb'
    };
I access the variable in this loop:
for ( var k in Object.keys($scope.validCredentials) ) {
                $log.info("K: " +  k);
}
I have read in another question here on StackOverflow that Object.keys would return me the keys of a map, and this is happening somehow, because Firebug during debug correctly gives me the two email addresses.
However the "$log" function gives me 0 (or 1, depending on the cycle), and 0 is also the value that is used later in code, when I check this value against another variable.
Any idea why? What's happening?
I have tested it on firefox and chrome, firebug or developer tools give me the emails list during debug, but the logger logs numbers.
 
     
     
    