[SOLVED] Having a tough time displaying a list from moralis

in react {next js} I know there has to be an index for each array element. And I get two values from moralis for every line. but putting them into an array and outputting them jsx is getting to be difficult. can anyone help ?

I only know that you can use console.log(JSON.stringify(variable_name)) in order to see how the data looks like

I got it

            {listOfTeams.map((_team, index) => (
              <div key={index}>
                <div className={styles.lot} onClick={doSomething}>

and make sure to put

let listOfTeams:string[] = [];

before this line

export default function TeamCreate() {

thanks bro

1 Like