const arr = [
{
id: 1,
name: "张三",
children: [
{
id: 1.1,
name: "张四",
children: [{ id: 1.11, name: "张五" }]
}
]
}
];
已知张五id,怎么拿到张四id
已知张四id,怎么拿到张三id