# TO_STRING function

## `TO_STRING` function

| Function Name | Description | Usage | Input parameter | Return value |
|---|---|---|---|---|
| `TO_STRING` | Converts a number or a JSON to a string. | `TO_STRING()` | N/A | A string. |

## Supported data type


The `TO_STRING` function supports the following data types:

- Boolean
- JSON

## Example: Convert an integer to a string


**Sample data** : `$var1$ = 235`


**Usage** : `$var1$.TO_STRING()`
Convert var1 to a string.


**Output** : `235`

## Example: Convert a JSON to a string


**Sample data**:

```
$var1$ =
{
  "dbIntegers": [1.0, 2.0, 3.0, 4.0],
  "dbString": "test"
}
```

<br />


**Usage** : `$var1$.TO_STRING()`
Convert *var1* to a string.


**Output**:

```
{
  "dbIntegers": [
    1,
    2,
    3,
    4
  ],
  "dbString": "test"
}
  
```

<br />

## Recommendation

- Learn how to add and configure a [Data Mapping task](https://docs.cloud.google.com/application-integration/docs/configure-data-mapping-task.md.txt)