I just caught this behavior, spent several hours until I realized that the console was broken, and not my code. pancake.
So far, I have managed to get the expected behavior with:
console.log(JSON.stringify(obj))
good side effect, it expands objects like {0: "a", 3: "b"}
source share