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

162
Views
How to group data by key of object

I have an input array of objects :

 [{
        "title": "popo",
        "Id": "123",
        "name": "john"

    },
    {
        "title": "test",
        "Id": "123",
        "name": "word"

    },
    {
        "title": "lala",
        "Id": "222",
        "name": "ref"

    },
    {
        "title": "mood",
        "Id": "222",
        "name": "trap"

    }]

And I need an output array of objects like this:

 [{
        AppId: "123",
        Titles: {
           'popo' : 'name',
           'test' : 'word',
        }
  },
  {
        AppId: "222",
        Titles: {
           'lala' : 'ref',
           'mood' : 'trap',
        }
  }]

which is grouping the data by the Id and manipulating key names. I tried using lodash and Array/Object functions but I cant get the result I want. Any idea how to approach this?

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!