title: My Mikrotik api json_encode shows null data in datatable
body: <pre><code>&lt;?php
  namespace App\Controllers;
  use App\Libraries\Mikweb;
  
  class Logs extends Security_Controller {
      function __construct() {
          parent::__construct();
          $this-&gt;access_only_admin_or_settings_admin();
      }
      function index() {
      
          return $this-&gt;template-&gt;rander(&quot;logs/index&quot;);
      }
      //get data for logs list
      function list_data() {      
          $API = new Mikweb();        
          $API-&gt;connect('192.168.88.6', 'shyriad', 'shyriad#1332');   
          $list_data = $API-&gt;comm('/ppp/profile/print');  
          foreach ($list_data as $data) {
          $result[] = $this-&gt;_make_row($data);
  
          }
          echo json_encode(array(&quot;data&quot; =&gt; $result));         
          
      }
      
      //prepare an client groups category list row
      private function _make_row($data) {
          return array($data-&gt;name);
          
      }   
  
  }
  
  /* End of file logs.php */
  /* Location: ./app/controllers/logs.php */
  </code></pre>