[@rxap/tree](../wiki/globals) / flatTree

# Function: flatTree()

> **flatTree**\<`Data`\>(`tree`, `all`): `Node`\<`Data`, `any`\>[]

Defined in: [tree/src/lib/tree.data-source.ts:86](https://gitlab.com/rxap/packages/-/blob/e4552670b179901abc7ce57cc3ff490ac705b867/packages/angular/tree/src/lib/tree.data-source.ts#L86)

## Type Parameters

• **Data** *extends* `unknown` = `any`

## Parameters

### tree

`Node`\<`Data`, `any`\> | `Node`\<`Data`, `any`\>[]

### all

`boolean` = `false`

## Returns

`Node`\<`Data`, `any`\>[]
