Fixing TOML ArrayTable parsing issues #1758

This commit is contained in:
Mike Farah
2025-11-22 14:35:07 +11:00
parent f00852bc6c
commit 306dc931a5
5 changed files with 160 additions and 46 deletions
+21
View File
@@ -104,6 +104,27 @@ owner:
suburb: nice
```
## Parse: Array of Array Table
Given a sample.toml file of:
```toml
[[fruits]]
name = "apple"
[[fruits.varieties]] # nested array of tables
name = "red delicious"
```
then
```bash
yq -oy '.' sample.toml
```
will output
```yaml
fruits:
- name: apple
varieties:
- name: red delicious
```
## Parse: Empty Table
Given a sample.toml file of:
```toml