W3cubDocs

/Nushell

into record for conversions

Convert value to record.

Signature

> into record {flags}

Input/output types:

input output
datetime record
duration record
list<any> record
range record
record record
table record

Examples

Convert from one row table to record

> [[value]; [false]] |into record
╭───────┬───────╮
valuefalse
╰───────┴───────╯

Convert from list to record

> [123] |into record
╭───┬───╮
01
12
23
╰───┴───╯

Convert from range to record

>0..2|into record
╭───┬───╮
00
11
22
╰───┴───╯

convert duration to record (weeks max)

> (-500day-4hr-5sec) |into record
╭────────┬────╮
week71
day3
hour4
second5
sign-
╰────────┴────╯

convert record to record

> {a:1, b:2} |into record
╭───┬───╮
a1
b2
╰───┴───╯

convert date to record

>2020-04-12T22:10:57+02:00|into record
╭──────────┬────────╮
year2020
month4
day12
hour22
minute10
second57
timezone+02:00
╰──────────┴────────╯

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