nushell/docs/commands/into_bool.md
JT 96a1bf5f8d
Experiment: Allow both $true/true and $false/false (#4696)
* Change true/false to keywords

* oops, clippy

* Both kinds of bools

* Add in some boolean variables

* disable py virtualenv test for now
2022-03-02 19:55:03 -05:00

43 lines
581 B
Markdown

---
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
> echo [[value]; ['false'] ['1'] [0] [1.0] [true]] | into bool value
```
Convert bool to boolean
```shell
> true | into bool
```
convert integer to boolean
```shell
> 1 | into bool
```
convert decimal string to boolean
```shell
> '0.0' | into bool
```
convert string to boolean
```shell
> 'true' | into bool
```