I have an array of SockJSConnections . I want to console.log them on the server.
if (activeSockets && activeSockets.length) {
activeSockets.forEach(socket => console.log(`socket is ${socket} ${new Date()}`));
}
Doing that ^ gives me an output like..."<SockJSConnection e567c62f-cfad-3d21-8cb8-21dae1e9c4a6>" though..
However, doing the same console.log in Chrome Debugger prints out the actual Objects with the metadata I want to see and not just the id.
Why is this happening and what does the <Object> syntax mean in JS ?
Edit: Seems like printing in a for of gives me what I want. No idea why it doesn't work in foreach