into bool
for conversions> into bool {flags} ...rest
...rest
: for a data structure input, convert data at the given cell pathsinput | output |
---|---|
bool | bool |
int | bool |
list<any> | table |
number | bool |
record | record |
string | bool |
table | table |
Convert value to boolean in table
> [[value]; ['false'] ['1'] [0] [1.0] [true]] |into boolvalue
╭───┬───────╮
│# │ value │
├───┼───────┤
│0│false│
│1│true│
│2│false│
│3│true│
│4│true│
╰───┴───────╯
Convert bool to boolean
>true|into bool
true
convert integer to boolean
>1|into bool
true
convert float to boolean
>0.3|into bool
true
convert float string to boolean
>'0.0'|into bool
false
convert string to boolean
>'true'|into bool
true
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/into_bool.html