/** * {@inheritdoc} */ public function jsonSerialize() { $data = parent::jsonSerialize(); foreach ($data as $index => $row) { if ($row === null) { unset($data[$index]); } } return $data; }
/** * {@inheritdoc} */ public function jsonSerialize() { $data = parent::jsonSerialize(); // Get rid of the empty values foreach ($data as $index => $row) { if ($row === null) { unset($data[$index]); } } return $data; }