> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://support.pdfgeneratorapi.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Utility functions


##### Empty

The **empty(value)** checks if the variable exists and if the value is not “falsy”. Returns true if var does not exist or has a value that is empty or equal to zero, aka falsely. Otherwise, it returns false.

```
{% empty({dataField}) ? 'No value' : 'Field has value' %}
```

What qualifies as "falsy"?
* Anything that returns false if cast to boolean
* Empty array
* Zero as number
* Zero as string
* Empty string
* null
* false
* undefined

##### JSON decode

Decode JSON string to use in an expression.

```
{% json_decode('{"key": "value"}', true) %}
```
---
### Related articles you may find helpful

* [Checkbox & Radio button Component](https://support.pdfgeneratorapi.com/en/article/checkbox-radio-button-component-1idy3y4/)
* [How to create Nested Array (Multidimensional Array)?](https://support.pdfgeneratorapi.com/en/article/how-to-create-nested-array-multidimensional-array-1xwmauu/)
* [Is it possible to conditionally change the component style or hide the component?](https://support.pdfgeneratorapi.com/en/article/is-it-possible-to-conditionally-change-the-component-style-or-hide-the-component-z8nmwg/)
