title: $getjson and booleans
body: <p>I am learning jquery. I have a url which gives a json dump "/check_email_exists" which gives true or false. This is primarily HttpResponse of a jsondump.</p>
  
  <p>How do I write a Javascript function which gives a true or false based on the json true or false.</p>
  
  <p>I tried this</p>
  
  <pre><code>function ifEmailExists(email)  
  {  
  
    return $.getJSON("/check_email_exists/" + email);
  }
  </code></pre>
  
  <p>Obviously this is not working.What's the right way?</p>
  
  <p>edit</p>
  
  <p>I also tried this</p>
  
  <pre><code>function ifEmailExists(email)  
  {  
      $.getJSON("/check_email_exists/" + email), function(data)   
      {  
  
            return data;  
  
  
       }
  };
  </code></pre>
  
  <p>No Success</p>