title: Want to show unique values only using d3.js not working
body: <p>I have  large dataset with the same detector having multiple occurrence. There are also many detectors. I want to fill a combobox with the unique detectors only. 
  I am using the following code:</p>
  
  <pre><code>d3.select("#detectors")
      .selectAll("option")
      .data(d3.map(data, function(d) {
              return d.code;
          })
          .keys())
      .enter()
      .append("option")
      .text(function(d) {
          return d;
      }).attr("value", function(d) {
          return d;
      });
  </code></pre>
  
  <p>But its not showing unique detector codes. Rather the combobox is being filled with number from 1 to ongoing.
  How can I do my desired goal. My sample simple dataset is</p>
  
  <pre><code>var data=[{"code":5222,"date":3-4-2015},{"code":5222,"date":3-6-2015},{"code":5222,"date":3-7-2015},];
  </code></pre>
  
  <p>The data has in real a large number of detectors with unique code. I want to show these unique codes in the combobox. For the above case there will be only one 5222 in the options</p>