> ## Documentation Index
> Fetch the complete documentation index at: https://docs.alumio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cast: Integer

> Converts a value into an integer (1, 2, 3, 10, 25, etc).

Converts a value into an integer (1, 2, 3, 10, 25, etc). Use this when a whole number arrives as text, such as a quantity of `"42"` from a spreadsheet, and the target system needs a real number rather than a piece of text. It keeps only the whole-number part: `"42"` becomes `42`, and a decimal like `"19.95"` is cut down to `19` (it does not round up). A value that does not start with a number becomes `0`.

This documentation describes: [Schema](/schemas/mapper/cast-int)

## Fields

This mapper has no settings to configure. Point it at the value you want to convert and it does the rest.

## Sample data

| Field | Value |
| - | - |
| (no settings) | |

Input:

```json theme={null}
{
    "quantity": "42"
}
```

Output:

```json theme={null}
{
    "quantity": 42
}
```

```json Configuration theme={null}
{
  "prototype": "cast-int",
  "parameters": {}
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.