lightning:tree metatext example

A lightning:tree component displays the visualization of a structural hierarchy, such as a sitemap for a website or a role hierarchy in an organization. metatext one of the attributes which you can pass it to the array of items .metata attribute is used to provide users with supplemental information and aid with identification or disambiguation. For example, if you want to provide the contact details in the Items that are displaying as shown in the below image.

Apex Class 

Lightning Component