I am working on this React problem in which I want to display parent array from child array. For example, I have the Back Button and array Button
text: [
title:"A1"
list: [
title: "A2"
list: [ title: "A3"]
title: "A2"
],
title: "B1"
list: [ title: "B2"],
title: "C1"
list: [ title: "C2"],
]
displayed as
Back Button
A1
B1
C1
and if a person clicks on "A1", it is displayed as
Back Button
A2
A2
if a person clicks on button,it should display the parent array like (I need to display this)
Back Button
A1
B1
C1
My_Code anyone know how to do this?