public function buildJsParams($parameters)
    {
        if (! $parameters) {
            return '';
        }

        $extractedParams = $this->extractJsFunctions($parameters);

        $json_parameters = json_encode($extractedParams['parameters'], JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES);

        $json_parameters = str_replace($extractedParams['replacements'], $extractedParams['values'], $json_parameters);

        return trim($json_parameters, '{}');
    }