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

114
Views
What is the best way to iterate over an array in react?

I get something like this from api

[0, 1000], [1, 2000], [2, 1500]

where the first digit is the type and the second is the price.

And I iterated through the array like this:

const discountStud = discounts?.find((el) => el[0] === 1)?.filter((item) => item !== 1)

Is there a more elegant way? I write in React, and you can use lodash

P.S. I only need to get the price

about 4 years ago · Juan Pablo Isaza
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!