Trying to separate object array in to a different object array

Hello,

I have a object array consists of parent child values and I’m trying to create a new object array with sub values pulled from a master object array and its not working…

example output:

  • Brown1 (parent)
    – saddlebrown2 (child)
    – chocolate2
    – peru2
    – goldenrod2

I have a somewhat working script at: https://stackblitz.com/edit/angular-xafyq5

if you click on the link above and then on ./app->testingCategory folder → file get-color.service.ts. → method called getSubCategoryList().

thanks

Solved…thank you.

I’m glad you solved it, @robin01, but it would be very helpful if you could briefly explain what you did to solve it so that others reading this thread could learn from it too.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.