The context.res object is generated by the Azure function runtime as a wrapper around the node runtime's default response object and contains all the information that is sent back to the client after the function executes.
Most of the data transfers do not require the data to be in a string format.
Simply adding this to the beginning of the specific function will always return the JSON object format instead:
This forces the response header to the http request to have the json content type for the data.
So instead of having a response like this:
You will end up with:
If you liked this post, please share it!