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

260
Views
javascript array.find() use every element in array only once

i have two arrays of objects i need to find the matching id from the first array in the seconde one, right now the code works but i need the elements in the first array CartVar to only be used once so there is no repetition

cart.map((order_item, index) => {
  return (
    <li key={index}>
      <div>
        <a>
          {order_item.title}
        </a>

        <span>
          {CartVar.find((x) => x.id === order_item._id).Quantity} x {order_item.Price}$
        </span>
      </div>
    </li>
  );
})
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!