Prefill form in Divhunt using url parameters - REDUX

Saw this post post. And using it to try to fill in a form on load with query parameters. Works great for an input field, but not so great for an option-select.

I am repeating a group of options based on a REST call to the database, where the value attribute is set to $opt->get(‘key’,‘’)
I tried setting a selected value for each option but it doesn’t want to work
$opt->get(‘key’,‘’) == $opt->get(‘role’,‘’) ? true : false

I also tried this for the selected attribute:
$opt->get(‘key’,‘’)->Equals($query->(‘role’,‘’), ‘’)
But also with no luck.

Any help on how I could do this?

Hi, I raised similar question in this post: How to get form options in select field from REST API source?

But no solution yet