title: How to send personal messages using socket io and node express
body: <p>im implementing a chat system where you can send personal messages to a particular person connected to a shocket.
  first im putting the username as a key along with the shocket.id to a jason called "connectedUser".</p>
  
  <pre><code>socket.username=loggeduser;
  connectedUser[socket.username]=socket.id;
  </code></pre>
  
  <p>Then im using this code send a personal message</p>
  
  <pre><code>socket.broadcast.to(connectedUser[usersnametobesent]).emit('chat', { message:result});
  </code></pre>
  
  <p>this works perfectly but whenever i use this it only shows the message on receiver's side but not the clients. i need it to be shown in both sender and receiver's side.</p>