List specific page field entries in a menu bar

Hi all, this is my first post in the forum. I’m trying to create a sorting menu (snippet) which will allow to sort all the subpages based on available fields. There are plenty of different fields which makes everything complicated. It’s easy to list all children or fields from a specific page, but what I currently don’t understand is how to create an array consisting ALL available entries from a certain field across all subpages.

In example:
page: understand/service-apps/app1 has topic: mobil, festnetz
page: understand/service-apps/app2 has topic: access, festnetz

The Menu would need to show: access(1x), mobil(1x), festnetz(2x)

I’m not sure if my strategy is the right approach (maybe easier with multiple tagclouds…?), any help much appreciated!

Here is the Blueprint example:

title: Services & Apps
pages: false
files:
  sortable: true

fields:

  title:
    label: Title
    type:  text
    width: 3/4

  icon:
    label: Icon
    type: image
    width: 1/4

  line-title:
    type: line

  stakeholder:
    label: Stakeholder
    type: checkboxes
    options: query
    query:
      page: understand/stakeholder
      fetch: visibleChildren
      value: '{{title}}'
      text: '{{title}}'
      flip: true

  topic:
    label: Topic
    type: checkboxes
    options:
      access: Access
      mobil: Mobil
      festnetz: Festnetz
      
  positivefeedback:
    label: Positive Feedback
    type: structure
    modalsize: small
    style: table
    entry: >
      {{name}}
      {{text}}
      {{plattform}}
      {{rating}}
    fields:
      name:
        label: Customer Name
        type: text
      text:
        label: Customer Feedback
        type: textarea
      plattform:
        label: Plattform
        type: radio
        options:
          ios: iOS
          android: Android
      rating:
        label: Rating
        type: number

You can use the pluck() method: https://getkirby.com/docs/cheatsheet/pages/pluck

The “Filtering Compendium” has an example: https://getkirby.com/docs/solutions/filtering#using-filters-with-forms-e-g-select-fields

@texnixe thanks for the quick reply! thanks for the “Filtering Compendium” example, must have overseen it. Will give it a try )