Cannot read property 'forEach' of undefined

Hi
I’m trying to display my api in the wix code dropdown.
in the terminal, the backend is returning an array in table form with the values ​​of the api.
In the PAGE CODE is not showing in the dropdown button a forEach error appears. “Cannot read property ‘forEach’ of undefined”

import { lerLista } from 'backend/manualAPI_vs2'; 

// /*FRONTEND */
$w.onReady(() => {
    listarEquipamentos()
})

function listarEquipamentos() {
 let opcoes = []
 let listaDeEquipamentos = []

    lerLista("equipamentos")
 .then(async (lista) => {
            console. log(lista)

 await lista. Equipamentos.forEach((value, i) => {
                listaDeEquipamentos. push(value. nome_equipamento + "***" + value. id)
 })
            listaDeEquipamentos. sort(function (a, b) {
 return a. localeCompare(b);
 });
 await listaDeEquipamentos. forEach((pais, index) => {
 let dados = pais. split("***")
                opcoes. push({ "value": String(dados[1]), "label": dados[0] })
 })
            $w("#dropdown1"). options = opcoes
            $w("#dropdown1"). enable()
 })
}
backend
/*BACKEND */
import { fetch } from 'wix-fetch';
 
let ret
export async function lerLista(equipamentos) {
 const headers = {
 "Content-Type": "application/x-www-form-urlencoded"
 };
 const request = {
 "method": "get",
 "headers": headers,
 };
 
 const url = 'http://3b88a1d8ac67. ngrok. io/equipamentos';
    console.log("Url: " + url + '/?format=json');
 let fullUrl = url + '/?format=json'; 
 
 try {
 let httpResponse = await fetch(fullUrl, request)
 if (httpResponse. ok) {
            ret = await httpResponse. json()
 } 
 } catch (erro) {
        ret = await erro
 }
 return ret
}

display

It looks like lista is not an object with a property key Equipamentos .
Isn’t lista an array?

Few side notes:
front end - you don’t need the async and await (.forEach() is not a promise).
backend - the ret deceleration should be inside the function scope, not on the global scope. + No need to use await erro

this list is an array.
List is to show the names of “equipment”.
do you know any other simpler properties in wix code?

If it’s an array you can’t use lista.Equipamentos (arrays only have some built-in properties such as .length).

This “Equipmentos” is my table where we have a list of equipment.
I put it there to get the list from this table
http://3b88a1d8ac67. ngrok. io/equipamentos

@jonatandor35 sorted out! tks