[
"id" => 7
"parent_id" => 9
"child_id" => 11
"children" => [
0 => [
"id" => 4,
"parent_id" => 11,
"child_id" => 2
]
1 => [
"id" => 5,
"parent_id" => 11,
"child_id" => 3
]
2 => [
"id" => 6,
"parent_id" => 11,
"child_id" => 4
]
]
]
1 => [
"id" => 8,
"parent_id" => 10,
"child_id" => 11
"children" => [
0 => [
"id" => 4,
"parent_id" => 11,
"child_id" => 2
]
1 => [
"id" => 5,
"parent_id" => 11,
"child_id" => 3
]
2 => [
"id" => 6,
"parent_id" => 11,
"child_id" => 4
]
]
]
the generation rules are as follows
the child_id under parent_id- > child_id- > children of each object is an array
above the result is
[[9,11,2,3,4],[10,11,2,3,4]]