Endpoint data format

So if call a endpoint and return a body they output looks like the next one.
That sucks if you want to use it in production for a front-end.

The current script behind the endpoint looks like following.

Is there any way how to fix this?
To get it nice and only the result of the function that is being called?

Product: PowerShell Universal
Version: 1.4.6