Add Product Options to Dropdown. Assign selection to variable.

Hi there,

I wonder if anyone could advise on the following:

A. create a dropdown with the product options (List).
B. assign the selection to a variable.

The syntax I’m using is:

let dropdownOptions = $w("#myDropdown").options;$w("#myDropdown").options = dropdownOptions;

Any tips would be appreciated. Thanks!