Check for a value in a custom query

After some serious thinking and some trial and error I came up with this solution.
Because all data in the query comes from ACF fields I found a way to use the data from these fields to get the result I was looking for using a For loop:

// Get the values from the ACF object (radio buttons)
$all_names = get_field_object('medewerker_werkzaam_bij');
// Put the choices from that object in an array 
$all_label_names = $all_names['choices'];
// Count the number of items to use in the 'For' loop. Because a loop starts with '0', decrease the value for that variable with 1              
$num_labels = count($all_label_names)-1;


for ( $my_label = 0; $my_label <= $num_labels; $my_label++ ){
    $all_query = new WP_Query(array(
        'post_type'         => 'collegas',
        'posts_per_page'    => -1,
        'meta_query'        => array (
                                    'label'     => array (
                                        'key'   => 'medewerker_werkzaam_bij',
                                        'value' => $my_label,
                                    ),
                                    'persoon'   => array (
                                        'key'   => 'medewerker_achternaam',
                                    ),
                                ),
        'orderby'           => array (
                                    'label'     => 'ASC',
                                    'persoon'   => 'ASC',
        )
    ));                 
    if ( $all_query->have_posts() ) {
    $my_label_name = $all_label_names[$my_label];

    <h2 id="<?php echo $my_label_name; ?>" class="<?php echo $my_label_name;?>"><?php echo $my_label_name;?></h2>
    <div class="<?php echo $column_class; ?>">
        while ( $all_query->have_posts() ) {
            $all_query->the_post();
            get_template_part( 'loop-templates/content-collegas', get_post_format() );
        }
    } else {
        get_template_part( 'loop-templates/content', 'none' );
    }
    </div>
}

deneme bonusudeneme bonusu veren sitelerpulibet girişOnwin Güncel Giriştürkçe altyazılı pornocanlı bahis casino