I am trying to pass the contents of io.sockets.clients() through to the client with the following code:
var room_users = io.sockets.clients(newroom);
socket.emit('update_room_users', room_users);
(newroom is a string var)
But I get the error:
Converting circular structure to JSON
in the console.
I have no idea why this is happening as this should be the correct code according the the socket.io site?