title: Selecting distinct values from a JSON
body: <p>I have my JSON as follows</p>
  
  <pre><code>{"DATA": [{"id":11,"name":"ajax","subject":"OR","mark":63},
  {"id":12,"name":"javascript","subject":"OR","mark":63},
  {"id":13,"name":"jquery","subject":"OR","mark":63},
  {"id":14,"name":"ajax","subject":"OR","mark":63},
  {"id":15,"name":"jquery","subject":"OR","mark":63},
  {"id":16,"name":"ajax","subject":"OR","mark":63},
  {"id":20,"name":"ajax","subject":"OR","mark":63}],"COUNT":"120"}
  </code></pre>
  
  <p>Is there any good method to find out the <code>distinct name</code> from this JSON</p>
  
  <p>Result <code>javascript,jquery,ajax</code></p>
  
  <p>I can do this using following methode </p>
  
  <pre><code>var arr=[''];
  var j=0;
  for (var i = 0; i &lt; varjson.DATA.length; i++) {
    if($.inArray(varjson.DATA[i]["name"],arr)&lt;0){
        arr[j]=varjson.DATA[i]["name"];
        j++;
    }
  }
  </code></pre>
  
  <p>Is there any <code>better method</code> which gave me better performance?</p>