# How to scrape views for all matching components

**URL:** <https://forum.inductiveautomation.com/t/how-to-scrape-views-for-all-matching-components/84981>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 30, 2024, 9:26pm UTC](https://forum.inductiveautomation.com/t/how-to-scrape-views-for-all-matching-components/84981 "2024-01-30T21:26:00Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [January 30, 2024, 10:28pm UTC](https://forum.inductiveautomation.com/t/how-to-scrape-views-for-all-matching-components/84981/3 "2024-01-30T22:28:28Z")

</div>

> [@Iterate through all components programatically in Perspective?](https://forum.inductiveautomation.com/t/iterate-through-all-components-programatically-in-perspective/32938/21):
>
> We went with this one so our util library looks like def getComponents(element): def walkComponents(component): for child in component.children: yield child walkComponents(child) return walkComponents(element) def parseContainer(container): return { c.name: c.custom["outValue"] for c in getComponents(container) if "outValue" in c.custom } and call parseContainer on a container works as we expect it too. Decided on this one because it's the most readable to me and without need…

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-scrape-views-for-all-matching-components/84981)._
