Answer the question
In order to leave comments, you need to log in
How to output object of objects in angular?
Good afternoon!
There is an object inside which there are other objects, and inside them there are more objects. Can you tell me how to display key values using *ngFor?
const data = {
first_data: {
id: "1",
name: "First",
type: "Administration",
sections: {
main_section: {
id: "main_section",
name: "Main Section",
sub_sections: {
sub_first: {
id: "12",
name: "Subsection_name",
questions: {
first_question: {
id: "44",
name: "Answer"
},
second_question: {
id: "33",
name: "True"
}
}
}
}
}
}
}
}
Answer the question
In order to leave comments, you need to log in
a recursive function must be written either through the stack. pure ngFor in any way
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question