How to pass dynamic data/state between Sections in Liquid

I have a bug related to data scoping (I think) in a Shopify collections page. Only the section that updates the collection object, has access to its updated runtime values.

When a filter value is changed within a section, the collection data retains its state only within that section. It is SCOPED to the section.

How can I use the updated collection object, outside of the section?

Please see a simplified example of code the below. Part of the issue is i do not understand the relevance of the “data-” fields on the section tag, and i cannot find any documentation on them.


    {%- for filter in collection.filters -%}
       {%- for value in filter.values -%}
          {% if value.active %}
            

             {{ value.label }}
            
   
          {% endif %}
       {%- endfor -%}
     {%- endfor -%}