title: Distinct values in dropdown from JSON object
body: <p>I am trying to exttract distinct values into a drop down list using the following code but its not bringing in unique strings, can someone help please?</p>
  
  <p>function build_refinesearch_cancer_combo() {</p>
  
  <pre><code>    $('#combolist-cancer-type').empty();
      var list = [];
      var htmlResults = '&lt;option value="-1" selected&gt;Select cancer type_&lt;/option&gt;';
      for (var i = 0; i &lt; user.length; i++) {
  
          CancerID = user[i].FKCancerTypeID;
          Cancer = user[i].Cancer;
  
         if (Cancer != list) {
           htmlResults += '&lt;option value="' + CancerID + '"&gt;' + Cancer + '&lt;/option&gt;';
          list = Cancer;
          }
      }
      $('#combolist-cancer-type').append(htmlResults);
  
  }
  </code></pre>