2020-05-04 21:01:31 +00:00
# from toml
2020-05-13 17:23:33 +00:00
Converts toml data into table. Use this when nushell cannot determine the input file extension.
2019-10-25 18:38:55 +00: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 21:01:31 +00: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 18:38:55 +00:00
```shell
2020-05-04 21:01:31 +00:00
> open Cargo.lock | from toml
2019-10-25 18:38:55 +00:00
━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━━
metadata │ package
────────────────┼───────────────────
[table: 1 row] │ [table: 154 rows]
━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━
2020-05-04 21:01:31 +00:00
```