Useful function to reverse a JavaScript Object
I need to reverse an javascript object where the key was the socket id and the value was the username connected to the socketID. A user can connect to many sockets so in order to find out which SocketIDs that the user is connected to I needed to…