title: How to get distinct value in dropdown
body: <p>I implemented a drop down where the list is coming from a JSON file but the JSON has duplicate values. How can I get the unique values in that dropdown? Here is my code:</p>
  
  <pre><code>$(document).ready(function() {
      $.getJSON("data.json",function(obj) {
          $.each(obj, function(key, value){
              $("#dropdown1").append("&lt;option value=" + key + "&gt;" + value.name  + "&lt;/option&gt;");
          });
      });
  });
  </code></pre>
  
  <p>my JSON file looks like this:</p>
  
  <pre><code>[{
      "name": "abc1",
      "date": 1459461600000
  }, {
      "name": "abc1",
      "date": 1459461600000
  }, {
      "name": "abc1",
      "date": 1459461600000
  }, {
      "name": "syn2",
      "date": 1459461600000
  }, {
      "name": "syn2",
      "date": 1458834026000
  }];
  </code></pre>
  
  <p>In the first dropdown now I'm getting 5 values, <code>abc1</code> 3 times and <code>syn2</code> 2 times.  I want to get both <code>abc1</code> and <code>syn2</code> only once. Please help!</p>