# How to map with Cast: Boolean

**URL:** <https://forum.alumio.com/t/how-to-map-with-cast-boolean/262>\
**Category:** Transformers\
**Tags:** mappers\
**Created:** [November 3, 2022, 10:46am UTC](https://forum.alumio.com/t/how-to-map-with-cast-boolean/262 "2022-11-03T10:46:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alumio\_Bot](https://forum.alumio.com/user_avatar/forum.alumio.com/alumio_bot/32/1824_2.png) [@Alumio\_Bot](https://forum.alumio.com/u/Alumio_Bot)\
**Post date:** [November 3, 2022, 10:46am UTC](https://forum.alumio.com/t/how-to-map-with-cast-boolean/262/1 "2022-11-03T10:46:52Z")

</div>

### **Table Of Contents**

- General description
- Guide
- Video guide

### **General description**

The Cast: Boolean mapper converts a value into a boolean (true/false). This Mapper is particularly useful for ensuring consistent data formatting when integrating systems that rely on boolean values for processing.

### **Fields**

N/A

### **Sample data**

| **Input** | **Output** |
| --- | --- |
| 1 | true |
| 0 | false |
| “True” | true |
| “False” | false |

### **Guide**

Here’s how you can do it!

**Step 1:** Click on **Add Data Transformer**.

**Step 2:** Select **Value Mapper**.

**Step 3:** Select **Key Accessor** from the Accessor drop-down menu.

**Step 4:** Click on **Add Keys** and specify the key (or keys) that you want to map.

**Step 5:** Click on **Add Mappers** and select **Cast: Boolean**

**Step 6:** On clicking the **Run Test** button, you will see that the **Cast: Boolean** mapper has mapped the specified key (must be in 0s and 1s) to true/false accordingly.

### **Video guide**

[![](https://alumio-forum.s3.dualstack.eu-central-1.amazonaws.com/uploads/original/1X/4b7dded267d8af9b46fc523ad1e0fb981836a855.jpeg "Mapping: Cast") ](https://www.youtube.com/watch?v=7m6trUoDDc8)
