I'm looking for a way in Azure Functions v4 with .NET 6 to remove null fields from the response JSON. None of the options described in this answer worked for me.
I would like these fields be omitted, currently just using return new OkObjectResult(result);
(result being a list of objects)