I have an object that contains the following data. How can I get all the data in the title key using the recursive function? I want a function return a array include a, b, c, d, e, f
{
children: [
{
children: [
{
children: [],
title: "a"
}
],
title: "b"
},
{
children: [
{
children: [],
title: "c"
},
{
children: [],
title: "d"
}
],
title: "e"
}
],
title: "f"
}