title: GoogleChart Uncaught (in promise) SyntaxError: Unexpected token o in JSON at position 0
body: <p>I want to make a chart from datas in my local API. I can create piechart from my local in db. but i cant make the chart from my local API even though I already got the data.</p>
  
  <p>My model where I get the localapi </p>
  
  <pre><code>    {
          $data = file_get_contents('http://127.0.0.1/s_api/product/rSum.php');
          $data = json_decode($data-&gt;records);
          var_dump($data);
          return $data;
      }
  </code></pre>
  
  <p>Controller where I get the function from my model and display it on my view</p>
  
  <pre><code>public function index() 
      { 
          $this-&gt;load-&gt;view('piechart'); 
      } 
  
      public function getD()
      {
          $data = $this-&gt;model_data-&gt;getD();
  
          $responce-&gt;cols[] = array( 
              "id" =&gt; "", 
              "label" =&gt; "Topping", 
              "pattern" =&gt; "", 
              "type" =&gt; "string" 
          ); 
          $responce-&gt;cols[] = array( 
              "id" =&gt; "", 
              "label" =&gt; "Total", 
              "pattern" =&gt; "", 
              "type" =&gt; "number" 
          ); 
          foreach($data as $d) 
          { 
              $responce-&gt;rows[]["c"] = array( 
                  array( 
                      "v" =&gt; "$d-&gt;month", 
                      "f" =&gt; null 
                  ) , 
                  array( 
                      "v" =&gt; (int)$d-&gt;qor, 
                      "f" =&gt; null 
                  ) 
              ); 
          } 
  
          echo json_encode($responce);
  
      }
  </code></pre>
  
  <pre><code>    at JSON.parse (&lt;anonymous&gt;)
      at gvjs_Uh (jsapi_compiled_format_module.js:209)
      at new gvjs_R (jsapi_compiled_default_module.js:131)
      at drawChartD ((index):39)```
  
  but i dont know even I checked index 39 where the visualization of datatable but it just empty in inspection
  </code></pre>