Some documents hold repeating data inside other repeating data. A statement lists several invoices, and each invoice has its own line items. A shipping manifest lists several shipments, and each shipment has its own packages. With nested tables (also called table-in-table), Parseur's AI engine keeps each group of rows attached to the right parent, so you never have to match line items back to their invoice by hand.
When to use a nested table:
One document contains several records (invoices, orders, shipments, bookings)
Each of those records has its own list of rows (line items, packages, guests, payments)
If your document only has one record with one list of line items, a regular table is all you need. See Extract Data Using the AI Parsing Engine.
Note: Nested tables are available with the AI engine. You can nest tables up to 3 levels deep.
How to create a nested table
In this example, each document contains several invoices. We want the customer details for each invoice, plus that invoice's line items.
Step 1: Create the parent table
Go to the Fields tab in your mailbox and click + New Table if there are already fields populated, or Add a Table if starting from scratch:
Name it after the record that repeats, for example invoice_details. Add a column for each value that appears once per record, such as customer_name, address and delivery_number.
Step 2: Add a table inside the parent table
Under your parent table, click + Add column.
Give the column a name, for example
line_items, then set Output format to Table:
You can add Instructions to tell the AI exactly which rows to pick up, for example: "Each product line of this invoice. Exclude shipping and tax lines." If left blank, the AI uses the field name.
Click Update to save.
Step 3: Add columns to the nested table
Under your new nested table, click + Add column and create a column for each value in the row, such as quantity, description, unit_price and total_price. Pick a Number output format for amounts and quantities.
When you're done, your field list shows the nested table indented under its parent:
Step 4: Reprocess your document and review results
Open a document and click Re-process. Each invoice now appears as its own row, with its line items grouped underneath it.
Step 5: Download or export your data
Download your results or send them to your app as usual. See Manually download extracted data and Send parsed data using Webhooks.
What the result looks like
In the Export tab, to download your nested table data, you must select the download showing the parent and child table underneath the Download all fields text:
In JSON (webhooks, API and JSON downloads), each nested table is a list inside its parent row. Here is a document with two invoices:
{ "invoice_details": [ { "customer_name": "Acme Corp", "address": "12 Main St, Springfield", "delivery_number": "DN-1042", "line_items": [ { "quantity": 2, "description": "Steel bracket", "unit_price": 4.5, "total_price": 9.0 }, { "quantity": 10, "description": "M6 bolt", "unit_price": 0.2, "total_price": 2.0 } ] }, { "customer_name": "Globex Ltd", "address": "88 Harbor Rd, Shelbyville", "delivery_number": "DN-1043", "line_items": [ { "quantity": 1, "description": "Control panel", "unit_price": 120.0, "total_price": 120.0 } ] } ] }
Tips for accurate nested tables
Tip #1: Name the parent after the record that repeats
A clear name like invoices or shipments tells the AI where one record ends and the next begins. Use instructions on the parent table if the boundary isn't obvious, for example: "One row per invoice number."
Tip #2: Keep parent-level values in the parent table
Put values that appear once per record (customer, invoice number, date) in the parent table, not in the nested table. Values that apply to the whole document, like the sender, can stay as regular fields outside the tables.
Tip #3: Remove duplicate fields
If you previously extracted line items with a top-level table, delete it once the nested table is set up. Two fields asking for the same data can confuse the AI.
Tip #4: Don't nest deeper than you need
You can go up to 3 table levels, but most documents only need 2. Each extra level makes the result harder to review and export.
Frequently Asked Questions (FAQ)
Can I turn an existing table into a nested table?
Yes. Open your existing parent table, click + Add column, and set its Output format to Table. Then add columns to it and reprocess your documents.
Does table-in-table work with templates?
Table-in-table works with the AI Engines only.
How many levels can I nest?
Up to 3 table levels, for example orders > shipments > packages.
Some line items end up under the wrong invoice. What can I do?
Add instructions to the parent table that describe how records are separated, such as "Each invoice starts with an invoice number at the top of a page." Then reprocess the document. See How to Use Instructions to Improve AI Data Extraction.





