[@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/d77504e6fd71447b1032f897cabb2aefac17c260/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`\>[]
