# TO_INT function

## `TO_INT` function

| Function Name | Description | Usage | Input parameter | Return value |
|---|---|---|---|---|
| `TO_INT` | Converts a string to an integer. | `TO_INT()` | N/A | An integer. |

## Supported data type


The `TO_INT` function supports the following data types:

- JSON
- String

## Example: Convert a string to an integer


**Sample data** : `$var1$ = "35"`


**Usage** : `$var1$.TO_INT()`
Convert var1 to integer.


**Output** : `35`

## 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)