Moving json_encode to controller
Reducing entries into Data table