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

112
Views
Table react bootstrap component rendering from array

I want to render a Table component with N rows, where N corresponds to a given array lenght, and for each row there will be two columns: the 1st one with a parameter of the array of objects and the 2nd with the other parameter. How can i do that?
Here's a backbone

<Table>
            <thead>
                <tr>
                    <th>param #1</th>
                    <th>param #2</th>
                </tr>
            </thead>
            <tbody>
                ...for array.length-times...(
                <td>array[0].param1</td>
                <td>array[0].param2</td>
                ....)
            </tbody>
        </Table>
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

As I understand your question, you can use a map() method to do that. Here is the sample code.

<Table>
  <thead>
    <tr>
      <th>param #1</th>
      <th>param #2</th>
    </tr>
  </thead>
  <tbody>
    {yourArray.map(arrayData=>{
    return(
    <tr>
      <td>arrayData.param1</td>
      <td>arrayData.param2</td>
    </tr>
    )
    }
    )}
  </tbody>
</Table>
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!