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

124
Views
How merge two arrays based on the key value matches

I am calling two API's and I'm getting two responses with Array values I want to merge those two arrays based on the key-value(name) matches. can anyone help with this

response one

const items = [
    {
      date: "2016-01-11",
      data: [
        { name: "car", estimate: 1.94 },
        { name: "scooty", estimate: 0.73 },
        { name: "phone", estimate: 0.59 },
        { name: "laptop ", estimate: 0.59 }
      ]
    }
  ];

response 2

const value = [
    { name: "car", actual: 1.94 },
    { name: "scooty", actual: 0.73 },
    { name: "phone", actual: 0.19 },
    { name: "laptop ", actual: 1.79 }
  ];

I want to do like this can any help on this, please

const mergedArrays = [
    {
      date: "2016-01-11",
      data: [
        { name: "car", estimate: 1.94, actual: 1.94 },
        { name: "scooty", estimate: 0.73, actual: 0.73},
        { name: "phone", estimate: 0.93, actual: 0.19 },
        { name: "laptop ", estimate: 1.03, actual: 1.79 }
      ]
    }
  ];
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!