I am trying to use the value from a drop down list to reference an array which I am using to load some data via an API in the backend. So the drop down would return the variable name but then I need to send the associated array to the function. I tried (...selected_basket) syntax but that send the name not the array to the function.
var REITS = ['DIR-UN.TO', 'HR-UN.TO'];
var Airlines = ['AC.TO', 'IAG.LSE', 'RYA.LSE', 'AAL', 'UAL'];
var Insurance = ['CB.US', 'AIG.US', 'CS.PA', 'ALV.XETRA', 'PNGAY.US'];
var Technology = ['MSFT', 'AMZN', 'NOW', 'CRM'];
export function dropdown1_change(event) {
selected_basket = $w("#dropdown1").value;
load_table(selected_basket);
}
Any help would be appreciated.