NextDom\Helpers\AjaxHelper::getResponse

Convert data to JSON response