Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

160
Views
How to render a Map in typescript

I see lots of people converting data to arrays with methods not possible to me as far as I can see.

I am using react and typescript and have a very simple map that I wish to render as a list of buttons

Here is what I have so far

const renderPlayerChoice = (indexMap: Map<number, number>) => {
    // What I would like to do if it was possible
    return indexMap.map((key, value =>{
    // do stuff here
    return stuff
    }) 
}

But the map function does not exist for this object it only has a foreach which does not return any results

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Like so:

return Array.from(indexMap).map(([key, value]) => {
    // do stuff here
    return stuff;
});
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!