JsonColumn

Introduction #

JsonColumn help to turn a string column in json format into array. For example, if your data store in a table column is json type string. You can list that column in JsonColumn process then JsonColumn will process the column into array and pipe them to data stream.

Example #

<?php
use \koolreport\processes\JsonColumn;
class MyReport extends \koolreport\KoolReport
{
    public function setup()
    {
        ...
        ->pipe(new JsonColumn(array(
            "address","jobs" //List of all json-type column name
        )))
        ...
    }
}

Code explanation:

  1. In this example, we use JsonColumn process with two columns name input "address" and "jobs".
  2. After data is piped though the JsonColumn process, data in address and jobs will be converted to array.

Get started with KoolReport

KoolReport will help you to construct good php data report by gathering your data from multiple sources, transforming them into valuable insights, and finally visualizing them in stunning charts and graphs.