# Programmatically create json hierarchy

**URL:** <https://forum.inductiveautomation.com/t/programmatically-create-json-hierarchy/82920>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [December 8, 2023, 10:48pm UTC](https://forum.inductiveautomation.com/t/programmatically-create-json-hierarchy/82920 "2023-12-08T22:48:31Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [December 8, 2023, 11:03pm UTC](https://forum.inductiveautomation.com/t/programmatically-create-json-hierarchy/82920/2 "2023-12-08T23:03:59Z")

</div>

@Matthew.gaitan helped me solve a similar problem. In my application I used a Tree component as a navigation tree. The tree was populated by a text file very similar to the database data you've shown there. It worked out really well and the text file made editing the site menu a very simple task using a text field within the application (with appropriate user rights). I documented my final code so I hope it will be of use to you.

> [@Text tree to Tree component 'items' property](https://forum.inductiveautomation.com/t/text-tree-to-tree-component-items-property/75453):
>
> I'm experimenting with using the Tree component for navigation rather than the Menu Tree. It offers the user clear visibility of where in the site they are whereas the Menu Tree doesn't. I'm making the tree configurable within the application (subject to user roles) and want to use a simple markup structure to generate the Tree's props.items. Markup would look like this with the syntax anchor text | page URL. The URL can be passed to the tree's onActionPerformed event to cause a navigation to …

---

_[View the full topic](https://forum.inductiveautomation.com/t/programmatically-create-json-hierarchy/82920)._
