Home Explore Blog CI



nushell

1st chunk of `commands/docs/from_toml.md`
4741a0ffaba91a1257e6225fd631a8eb593f2554110eb0a6000000010000044c
---
title: from toml
categories: |
  formats
version: 0.104.0
formats: |
  Parse text as .toml and create record.
usage: |
  Parse text as .toml and create record.
editLink: false
contributors: false
---
<!-- This file is automatically generated. Please edit the command in https://github.com/nushell/nushell instead. -->

# `from toml` for [formats](/commands/categories/formats.md)

<div class='command-title'>Parse text as .toml and create record.</div>

## Signature

```> from toml {flags} ```


## Input/output types:

| input  | output |
| ------ | ------ |
| string | record |
## Examples

Converts toml formatted string to record
```nu
> 'a = 1' | from toml
╭───┬───╮
│ a │ 1 │
╰───┴───╯
```

Converts toml formatted string to record
```nu
> 'a = 1
b = [1, 2]' | from toml
╭───┬───────────╮
│ a │ 1         │
│   │ ╭───┬───╮ │
│ b │ │ 0 │ 1 │ │
│   │ │ 1 │ 2 │ │
│   │ ╰───┴───╯ │
╰───┴───────────╯
```

Title: from toml: Parse TOML formatted text into a record
Summary
The `from toml` command parses a string containing TOML (Tom's Obvious, Minimal Language) formatted text and converts it into a Nushell record. The examples demonstrate how to use the command to parse simple TOML strings into corresponding record structures.