title: Parsing JSON using Javascript. JSON from Laravel
body: <p>I am using laravel to query google's search api. Here is the code that does that: </p>
  
  <pre><code>Route::get('google/(:any)', function($query)
  {
      $uri = "http://ajax.googleapis.com/ajax/services/search/web?v=1.0&amp;q=".$query;
      $response = Httpful::get($uri)-&gt;send();
      $r = json_decode($response); 
      return Response::json($r);
  });
  </code></pre>
  
  <p>This can be accessed by <a href="http://example.com/w/google/queryhere" rel="nofollow">http://example.com/w/google/queryhere</a></p>
  
  <p>I am also trying to make more than one requests in javascript and parsing the json. </p>
  
  <pre><code>$.when( $.ajax(google), $.ajax(bing), $.ajax(yahoo)).then(function(resp1, resp2, resp3)
  { 
      var obj = jQuery.parseJSON(resp1);
  });
  </code></pre>
  
  <p>However, I am getting an unexpected syntax token when using the parseJSON method. I don't know where I went wrong.</p>