W3cubDocs

/Nushell

values for filters

Given a record or table, produce a list of its columns' values.

Signature

> values {flags}

Input/output types:

input output
record list<any>
table list<any>

Examples

Get the values from the record (produce a list)

> { mode:normaluserid:31415 } |values
╭───┬────────╮
0normal
131415
╰───┴────────╯

Values are ordered by the column order of the record

> { f:250g:191c:128d:1024e:2000a:16b:32 } |values
╭───┬──────╮
0250
1191
2128
31024
42000
516
632
╰───┴──────╯

Get the values from the table (produce a list of lists)

> [[namemeaning]; [lslist] [mvmove] [cd'change directory']] |values
╭───┬──────────────────────────╮
0╭───┬────╮
0ls
1mv
2cd
╰───┴────╯
1╭───┬──────────────────╮
0list
1move
2changedirectory
╰───┴──────────────────╯
╰───┴──────────────────────────╯

Notes

This is a counterpart to columns, which produces a list of columns' names.

Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/values.html