How does the Treegrid work


I don’t understand the examples nor the API for the Treegrid. What has my Object has to have so I can Represent it in a Treegrid?
At the moment my Object is a SearchResult with an String for the Searchvalue and a map of Searchresults in other Systems. This Map has the name of the oter System as String and the Values (as a Map) of fields found in this system.
I want the treegrid to show my the searchvalue as the node and for each system in the map one subnode.
Do you think it is possible and can someone show me how my Object has to look alike? I would also build an new Object which calls functions in my other two abjects.

Best regards Daniel