Home Explore Blog CI



nushell

commands/docs/from_toml.md
79fb336fffa2371b8927baf19dfb050ecbc02d44c7356474000000030000044c
---
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 │ │
│   │ ╰───┴───╯ │
╰───┴───────────╯
```

Chunks
4741a0ff (1st chunk of `commands/docs/from_toml.md`)
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.