title: How do I create a variable with the result from $http in angular?
body: <p>Im trying to get a json object from a http call with the following line.</p>
  
  <pre><code>var u = $http.get("http://localhost:8580/jettyjspconfiguration-example/sql?loc=locc");
  </code></pre>
  
  <p>When I log it</p>
  
  <pre><code>    console.log(u);
  </code></pre>
  
  <p>I dont get the json in return</p>
  
  <pre><code> Object { $$state: Object, success: $http/promise.success(), error: $http/promise.error()
  </code></pre>
  
  <p>How do i just make it return as a json string? Im using it in a factory if that matters. Thanks.</p>