Populate select drop-down with api-result/or list

Hi,
Am trying to populate a drop-down options with an api-response which I can put into a tmpList = [] or straight away from the response depending on what’s easiest?
How do I do this? Want the Code value(from list at the bottom) to populate the dropdownlist

                   {
                    view: "select",
                    id: "anId",
                    placeholder: ("Name"),
                    label: "Some User",
                    name: "Name",
                    labelPosition: "top",
                    options:[],
                   }

Here is the response I get from my api which I’ve put into a tmpList = [] which I then want to populate the options:[] as a drop down below where I want to show the value of the Code value.
0: {Code: “Hello”, Name: “John Doe”, DisplayName: “John”}
1: {Code: “GooBye”, Name: “Jane Doe”, DisplayName: “Cherry”}
2: {Code: “Ebenezar”, Name: “Mr Scrooge”, DisplayName: “Nice”}

Hi, is this what you were aiming to get? Code Snippet
“select” is unfortunately not so customizable as “combo” and “richselect”

init() {
    api.get("theUrl", res => {
        this.$$("anId").define("options", res.json().map(x => x.Code));
    })
}

This is what solved it for me.