I have a long JSON data storing in my database and i am using a PHP function to convert it into a tabular view with some HTML codes. I need to render it within a modal but when i pass it as an attribute through a serializer like this:
public function prepareApiAttributes(Serializing $event)
...
$event->attributes['someAttribute'] = $this->someFunction($event->model->jsonData);
// sample output from the someFunction() -> "<table><tr>...<td><div>...</div></td><td>...</td></tr></table>"
it seems that serializer escaping that output and i can't render it on the modal, it's nothing but a raw string. Are there any workarounds for this or should i use a JS function instead of a PHP function for converting my JSON into HTML view?