Controlling dropdown options with JSON response

@mikemoynihan99 Thanks. I have been following this example: https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api#backend-service-call

I’ve tried this but doesn’t seem to work:

$w.onReady( function () {
getAddresses(sessionpostcode)
.then(building_name => $w(“#dropdown1”).options = [
{“label” : building_name, “value” : building_name}]);
});

It’s the two sections above in green which seem to be where I am stuck