# Javascript: Table.nestedTables Property

> Gets a collection of all tables nested in this table.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: Table.nestedTables Property
- **324 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/nestedtables-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/nestedtables-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/table/nestedtables-property/llms-full.txt

---

### Description

Gets a collection of all tables nested in this table.

### Syntax

```javascript
<TableBaseCollection> Table.nestedTables
```

### Examples

The following example demonstrates `Table.nestedTables` in a practical document-editing workflow. It gets a collection of all tables nested in this table.

```javascript
function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

TXTextControl.textParts.getMainText(function(mainText) {
    const tables = mainText.tables;
    tables.getItem(function(table) {
        if (!table) {
            console.warn("No table is available at the current input position.");
            return;
        }
    
        table.nestedTables.getCount(function(count) {
            console.log("nested tables count:", count);
        }, onTxError);
    }, onTxError);
}, onTxError);
```

### Limitations

Read Only.

---

## Nearby

- **Previous:** [Javascript: Table.mergeCells Method](https://docs.textcontrol.com/ds-server/reference/javascript/table/mergecells-method/llms-full.txt)
- **Next:** [Javascript: Table.rows Property](https://docs.textcontrol.com/ds-server/reference/javascript/table/rows-property/llms-full.txt)
