The [[name]] double-bracket form
Arrays of tables solve a real config-file pain: 'a list of structured things, each with multiple fields, that I want to read or edit one at a time.' The syntax is double brackets: [[products]]. Every [[products]] block in the file appends one element to the products array.
When to reach for it
- An array of items, each with multiple fields.
- Items you want to comment, edit, or grep individually.
- Where inline-table arrays would be too long to read.
The [[]] vs [] distinction
[server] opens the server table (singular). [[plugins]] appends one element to the plugins array. Each [[plugins]] is its own self-contained block; the order in source = the order in the array.
Principle: when in doubt, structure that reads as 'one of N things' should be an array of tables, not a table of tables keyed by name. Arrays preserve order; reviewers can comment on each item; new entries append cleanly. Compare to YAML — same idea, less reliable diffs.