async call for data from tree view only returns Promise, not data

Hi, having trouble loading data into my tree view and would be grateful for help.

My model is getData.js and includes these lines:
async function getAssets() {
securityToken = await getToken();
var url = “”;
var response = await axios.get(url, { headers: { “X-Authorization”: "Bearer " + securityToken }, });
export { getAssets }

My view is test_tree.js and includes these lines in init():
this.loadData = function() {
var customerData = getAssets();

Problem is, when I call getAssets(), it only returns a Promise, never the actual data. I’ve also tried getAssets().then(function(customerData) {this.$$(“hierarchyTree”).parse(customerData)}) but that produces a promise rejection, and a “TypeError: Cannot read property ‘$$’ of undefined”.

getAssets is async function.
you need to await it to get result data
var customerData = await getAssets();
loadData is classic function.
you need to convert it to arrow function to point this to view

this.loadData = async () => {
    var customerData = await getAssets();

Thank you very much, set me straight!