title: JavaScript Object loop - Filter and show duplicates once
body: <p>I have some code that works kind of like this:</p>
  
  <pre><code>var date = new Date();
  var userMessage = {
      UserName: "Charlie",
      LastOnline: date.toDateString(),
      Name: "Charlie"
  };
  Object.keys(userMessage).forEach(function(user) {
     if (userMessage[user] == "Charlie") {
       document.write("Welcome Charlie!");
     }
  });
  </code></pre>
  
  <p>However this works fine but i only would like the document to write "Welcome Charlie!" once. It will be possible that the user will have the same field twice, How would i limit this to once? </p>
  
  <p>Soon this function will be wrapped with an angularJS ng-repeat. Maybe its possible to do this once with a filter?</p>
  
  <p>Fiddle Link:
  <a href="https://jsfiddle.net/dj5ka4g6/1/" rel="nofollow noreferrer">https://jsfiddle.net/dj5ka4g6/1/</a></p>
  
  <p>Thanks.</p>