var main = [
{
text: "hi",
child: [
{
text: "test"
},
{
text: "test",
child: [
{
text: "hello",
child: [
{
text: "A",
},
{
text: "B",
},
{
text: "C",
}
]
}
]
}
]
},
];
var indexes = [0, 1, 0, 2];
main[0].child[1].child[0].child[2]
. Вернуть функция должна {text: "C"}
.