Manage allowed-recipients (Uniform v4) via Panel

Hi Fellaz!

I would like to manage the allowed-recipients (Uniform Plugin) via the panel interface.
I’ve added a structured field like so:

        label: Allowed recipients
        type: structure
        style: table
        columns:
          allowedRecipientsName:
          allowedRecipientsEmail:
        fields:
          allowedRecipientsName:
            label: Form allowed recipients name
            type: text
          allowedRecipientsEmail:
            label: Form allowed recipients email
            type: text`

Now the output should look something like this:
    ``` 'allowed-recipients' => [
                'sales'     => 'sales@example.com',
                'marketing' => 'marketing@example.com',
                'feedback'  => 'feedback@example.com'
            ],`

I need to loop over the structure field and output the results
into an associative array.

Thanx for your help!

Saludos, Funkybrotha
<?php

$recipients = [];
foreach ( $page->allowedRecipients()->toStructure() as $item ) {
  $recipients[$item->allowedRecipientsName()->value()] = $item->allowedRecipientsEmail()->value();
}

$allowedRecipients = [
  'allowedrecipients' => $recipients,
];

Hallo @texnixe!

Vielen lieben Dank für Deine schnelle Hilfe!!!

Einen lieben Gruss und eine schöne Woche,

Funkybrotha