---
title: mapTreeItem
description: "Learn how to build custom functionality when working with the React TreeList by Kendo UI with the help of the mapTreeItem."
api_reference: true
type: inner_api
slug: api_treelist_maptreeitem
---
# mapTreeItem
Creates a new array with the results of calling the provided callback function
on the element which match the `level` in the provided data tree.
#### Parameters
##### tree
any[]
The data tree.
##### level
number[]
An array of indexes of each parent and current item in the data tree.
##### subItemsField
string
The field which points to the subitems collection of each data item.
##### callback
(value: any) => any
The callback function.