# \[FEATURE\] Tag Report Tool - Add option to Copy JSON with folder structure intact

**URL:** <https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457>\
**Category:** Ignition\
**Created:** [July 15, 2025, 5:18am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457 "2025-07-15T05:18:38Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 15, 2025, 5:18am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/1 "2025-07-15T05:18:38Z")

</div>

I want to use the tag report tool to filter tags for me and then be able to export the tag JSON of the results with the folder structure intact, but the existing "Copy JSON Def" context option just exports a flat list of the tags with no folder structure.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 15, 2025, 12:53pm UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/2 "2025-07-15T12:53:16Z")

</div>

What folder structure? The results are a flat list.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 15, 2025, 9:03pm UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/3 "2025-07-15T21:03:00Z")

</div>

The tagpaths have a folder structure 🤨

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 15, 2025, 11:14pm UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/4 "2025-07-15T23:14:40Z")

</div>

True, but the results from `system.tag.query()` are a list. You are on your own for any desired hierarchy.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 15, 2025, 11:23pm UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/5 "2025-07-15T23:23:36Z")

</div>

> [@pturmel](#):
>
> You are on your own for any desired hierarchy.

At the moment I am, hence the request for a feature, lol. However, it would be a feature of the UI, not the script function (the script function doesn't have a JSON "export" format currently, whereas the UI for it does)

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [July 16, 2025, 12:56am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/6 "2025-07-16T00:56:20Z")

</div>

that's objectively weird though, since the internal DB structure maintains hierarchy

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 16, 2025, 1:02am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/7 "2025-07-16T01:02:36Z")

</div>

Exactly. The fact that the only function to get the JSON, exports the tags in a flat structure without their paths even visible is very strange and more or less useless. Consider results that came from finding all tags with the name "Status". The exported "JSON Def" list would contain a list of many dicts in a flat list, all with the same name and no reference back to the folder structures they came from

---

<div class="post-metadata">

**Author:** ![Leor\_Fishman](https://avatars.discourse-cdn.com/v4/letter/l/e19adc/32.png) [@Leor\_Fishman](https://forum.inductiveautomation.com/u/Leor_Fishman)\
**Post date:** [July 16, 2025, 2:09am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/8 "2025-07-16T02:09:59Z")

</div>

I've built some internal tools for querying a postprocessed gateway backup that do handle this (as part of the larger dev toolset my team is building)

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [July 16, 2025, 2:27am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/9 "2025-07-16T02:27:46Z")

</div>

Sounds handy, I haven't written any tools yet for gw backups, but I have written plenty for development and smooshed them into a PyQt6 interface (_much_ better and infinitelymore powerful than tkinter if you've ever used that, fwiw).

I just wrote a function to produce this tag JSON now too. It's a bit annoying as it needs you to copy the table results and the JSON def into the tool manually which it then uses to produce the structured tag JSON. But it works and I won't need it very often.. Still would be nicer to have in the TRT itself

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 16, 2025, 11:40am UTC](https://forum.inductiveautomation.com/t/feature-tag-report-tool-add-option-to-copy-json-with-folder-structure-intact/108457/10 "2025-07-16T11:40:32Z")

</div>

> [@nminchin](#):
>
> without their paths even visible

Include "Full Path" as an output column. `fullPath` exists in the scripted results list whether requested or not, and is an actual BasicTagPath object.
