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

78
Views
how to combine array of object fast or in optimized way

I have two Array of objects [{id:'KS001', name: 'albedo'}] this is the first array which consist of 900+ objects.

{
  "changePoints": [
    {
      "Point": {
        "name": "001",
        "id": "KS001",
        "siteID": "258628",
        "connectorGroups": [
          {
            "connectorGroupID": 1,
            "connectors": [
              {
                "connectorID": "1",
                "connectorStatus": "AVAILABLE"
              }
            ]
          },
          {
            "connectorGroupID": 2,
            "connectors": [
              {
                "connectorID": "2",
                "connectorStatus": "AVAILABLE"
              }
            ]
          }
        ]
      }
    },
  ],
}

this is the second array that contains objects which have a point and id this id map with the first array as an identifier I need to check each connectorStatus in the second array with the corresponding id and add a new key to the first array status set "AVAILABLE" else not "NOT AVAILABLE"

I need to find the fastest way to do this

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

0

const object1 = {
  name: 'Flavio'
}

const object2 = {
  age: 35
}
const object3 = {...object1, ...object2 } //{name: "Flavio", age: 35}


const a = { b: 1, c: 2 };
const d = { e: 1, f: 2 };

const ad = { ...a, ...d }; // { b: 1, c: 2, e: 1, f: 2 }
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!