Keys are always of a String type. If you need numbers you will have to cast them manually:
var obj = { 0: 'a', 1: 'b', 2: 'c' };
var ids = Object.keys(obj).map(Number);
console.log(ids);
Keys are always of a String type. If you need numbers you will have to cast them manually:
var obj = { 0: 'a', 1: 'b', 2: 'c' };
var ids = Object.keys(obj).map(Number);
console.log(ids);