title: Uncaught SyntaxError: Unexpected token o in JSON at position 1
body: <p>i have a problem about passing variable from controller to javascript</p>
  
  <p>this is my controller</p>
  
  <pre><code>public function index()
  {
      $tourplace = Tourism::all();
  
      return view('spatialInfo')-&gt;with('tourplace',$tourplace);
  }
  </code></pre>
  
  <p>this is my javascript</p>
  
  <pre><code>$(document).ready(function(){
          var lokasi = [];
          var test = document.getElementsByName('kabupaten');
  
          var jsondata = JSON.parse({!! $tourplace !!});
          var htmlURL = '{{URL::to('/tourismplace/id/')}}';
          $.get(jsondata).success(function(data){
              var jumlahData = data.length;
              for(var i=0;i&lt;jumlahData;i++){
                  lokasi.push({
                      lat : data[i].latitude,
                      lon : data[i].longitude,
                      zoom : 15,
                      title : data[i].nama,
                      html : "&lt;a href='"+htmlURL+"/"+data[i].id +"'&gt;"+data[i].nama+"&lt;/a&gt;",
                      icon: 'http://maps.google.com/mapfiles/ms/micons/red-dot.png', // custom icon
                      animation: google.maps.Animation.DROP
                  });
      }
  });
  </code></pre>