2022-02-14 03:22:51 +01:00
|
|
|
---
|
|
|
|
title: into bool
|
|
|
|
layout: command
|
|
|
|
version: 0.59.0
|
|
|
|
---
|
|
|
|
|
|
|
|
Convert value to boolean
|
|
|
|
|
|
|
|
## Signature
|
|
|
|
|
|
|
|
```> into bool ...rest```
|
|
|
|
|
|
|
|
## Parameters
|
|
|
|
|
|
|
|
- `...rest`: column paths to convert to boolean (for table input)
|
|
|
|
|
|
|
|
## Examples
|
|
|
|
|
|
|
|
Convert value to boolean in table
|
|
|
|
```shell
|
2022-03-03 01:55:03 +01:00
|
|
|
> echo [[value]; ['false'] ['1'] [0] [1.0] [true]] | into bool value
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|
|
|
|
|
|
|
|
Convert bool to boolean
|
|
|
|
```shell
|
2022-03-03 01:55:03 +01:00
|
|
|
> true | into bool
|
2022-02-14 03:22:51 +01:00
|
|
|
```
|
|
|
|
|
2022-03-01 14:05:29 +01:00
|
|
|
convert integer to boolean
|
2022-02-14 03:22:51 +01:00
|
|
|
```shell
|
|
|
|
> 1 | into bool
|
|
|
|
```
|
|
|
|
|
|
|
|
convert decimal string to boolean
|
|
|
|
```shell
|
|
|
|
> '0.0' | into bool
|
|
|
|
```
|
|
|
|
|
|
|
|
convert string to boolean
|
|
|
|
```shell
|
|
|
|
> 'true' | into bool
|
|
|
|
```
|