--- title: "Utility" slug: "utility-filter" updated: 2026-02-25T18:19:58Z published: 2026-02-25T18:19:58Z canonical: "learn.servitly.com/utility-filter" --- > ## Documentation Index > Fetch the complete documentation index at: https://learn.servitly.com/llms.txt > Use this file to discover all available pages before exploring further. # Utility A set of general purpose functions and filters. ![Utility](https://components-manager.servitly.com/components/Utility_1/IMAGES/_screenshot?owner=AG_Servitly) # Filter Variants The set of predefined filter variants that can be used to format values. | *asString* | Converts the input value to a string. **Name**: *asString* **Input Types**: *ANY* **Output Type**: *STRING* | | --- | --- | | *Default Value* | Converts a null, empty string or undefined to a default value (e.g. N/A). **Name**: *toDefault* **Input Types**: *ANY* **Output Type**: *HTML* **Parameters** `toDefault:{"def": "N/A"}` \| *Default Value* \| The default value to be displayed. **Name**: def **Type**: STRING \\| Optional \| \| --- \| --- \| | | *Default Value* | The default value to be displayed. **Name**: def **Type**: STRING \| Optional | | *Format JSON* | Converts the input value to a JSON formatted text. **Name**: *formatJson* **Input Types**: *ANY* **Output Type**: *HTML* ![](https://components-manager.servitly.com/components/Utility_1/IMAGES/variants/formatJson/_image?owner=AG_Servitly) |