2020-05-04 23:01:31 +02:00
# from toml
2020-05-13 19:23:33 +02:00
Converts toml data into table. Use this when nushell cannot determine the input file extension.
2019-10-25 20:38:55 +02:00
## Example
Let's say we have the following Rust .lock file :
```shell
> open Cargo.lock
# This file is automatically @generated by Cargo.
# It is not intended for manual editing. [[package]] name = "adler32" version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index"
...
```
2020-05-04 23:01:31 +02:00
The "Cargo.lock" file is actually a .toml file, but the file extension isn't .toml. That's okay, we can use the `from toml` command :
2019-10-25 20:38:55 +02:00
```shell
2020-05-04 23:01:31 +02:00
> open Cargo.lock | from toml
2019-10-25 20:38:55 +02:00
━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
metadata │ package
────────────────┼───────────────────
[table: 1 row] │ [table: 154 rows]
━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
2020-05-04 23:01:31 +02:00
```