I am grouping child objects with parent objects. I have a short working example on Plunker
It works fine, and I understand the principle of nesting objects in one array. Now I would like to use two different scope arrays. Company(parent) - workers(child) example:
$scope.parent = [{id: 1, name: "Nike", productOf:"USA"}]
$scope.child = [{ id:1, firstName:"John", lastName:"Doe" },
{ id:2, firstName:"John2", lastName:"Doe2" },
{ id:3, firstName:"John3", lastName:"Doe3" }
]
I've really tried to do this on my own, I read a lot of articles, but I didn't find what I need.
Can somebody give me a hint what to do, or a link for an article? Thank you!