Is there a way to group/merge two related JSON?

I have a project that has two related json data. I want to group or merge that two json based the related object to be displayed as an accordion list.

Here is an example of that two related json :

The one is like this

    {
        {
          "ObjectId": '001',
          "ObjectName": 'Fruits'
        },
        {
          "ObjectId": '002',
          "ObjectName": 'Vegetables'
        }
    }

And the other one like this

    {
        {
          "Name": 'Apple',
          "Color": 'Red',
          "ObjectId": '001'
        },
        {
          "Name": 'Eggplant',
          "Color": 'Purple',
          "ObjectId": '002'
        },
        {
          "Name": 'Banana',
          "Color": 'Yellow',
          "ObjectId": '001'
        },
        {
          "Name": 'Spinach',
          "Color": 'Green',
          "ObjectId": '002'
        },
        {
          "Name": 'Garlic',
          "Color": 'White',
          "ObjectId": '002'
        },
    }

I hope someone could give me a solution. Thanks in advance!

https://stackoverflow.com/questions/38505448/how-to-merge-multiple-array-of-object-by-id-in-javascript Hope this might help you