0

I need to loop the parent object.. get the all parent's name value..

test = {
  id: 1,
  name: "xxx",
  parent: {
    id: 2,
    name: "yyy",
    parent: {
      id: "3",
      name: "zzz",
      parent: { id: "4", name: "qqq", parent: undefined }
    }
  }
}
pilchard
  • 12,414
  • 5
  • 11
  • 23
Chinnu
  • 194
  • 2
  • 15
  • also [Typescript get all values of a property from a nested object](https://stackoverflow.com/questions/71926253/typescript-get-all-values-of-a-property-from-a-nested-object) – pilchard Sep 15 '22 at 18:20

0 Answers0