# Integration Toolkit Solutions Wiki

**URL:** <https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080>\
**Category:** 3rd Party Modules\
**Tags:** scripting, ignition81\
**Created:** [April 14, 2025, 9:02pm UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080 "2025-04-14T21:02:36Z")\
**Posts on this page:** 1\
**Showing post:** 30

<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:** [May 26, 2026, 1:08pm UTC](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080/30 "2026-05-26T13:08:03Z")

</div>

# Converting a `tags()` output into a dict

Say you had a list of tag paths like this:

- AreaA/P001/Sts/Status
- AreaA/P002/Sts/Status
- AreaA/P003/Sts/Status

and you want to produce a dict with the equipment name and status tag value, e.g.

```python
{
  'P001': 'Running',
  'P002': 'Stopped', :face_with_hand_over_mouth:
  'P003': 'Running'
}

```

. You can use:

```python
view.custom.tagPaths: <your tag list>
view.custom.pumpStatuses:
asMap(
   forEach(
      tags({view.custom.tagPaths}),
      transform(split(it()[0], '/'), value()[len(value())-3, 0]),
      it()[1]
   )
)   

```

PS. I'm sure someone will tell me there's a simpler way...  
Phil: I would put the `tags()` function directly as the source for the `forEach()`. Just the actual list of tag paths would be in the custom prop. I would use the `parsePath()` function to extract the tag path inside the loop, and split just that part--otherwise you cannot use the first element when necessary. If you need more than one object level, you can use grouping on partial tag paths.

Nick: oh, using `tag` in the pumpStatuses expression is actually what I _did_ do in reality, I just bungled it up here 🤭 I need to look into your parsePath as it's currently a mystery to me!

---

_[View the full topic](https://forum.inductiveautomation.com/t/integration-toolkit-solutions-wiki/105080)._
