How to grope object inside the nested array in Ionic?

I want to array an object from this array by array parent name.

enter image description here

I am getting data like the above image.

I tried this and got this result:

      const items = {};
      this.basketData.Categories.forEach(arr => {
        arr.forEach(obj => {
          const { ParentCategoryName, ChildItems } = obj;
          if (items[ParentCategoryName]) {
            items[ParentCategoryName].push(ChildItems[0]);
          } else {
            items[ParentCategoryName] = [ChildItems[0]];
          }
        });
      });

And get this result from the above codes:

enter image description here

Please help…