<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>json获取</title>
</head>
<body>
</body>
<script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
<script>
var json = [{
"id": "1",
"isEdit": false,
"name": "11111",
"children": [
{
"id": "299",
"isEdit": false,
"name": "新增",
"children": [
{
"id": "300",
"isEdit": false,
"name": "300d",
"children": [
{
"id": "410",
"isEdit": false,
"name": "新增节点1",
"children": [
{
"id": "426",
"isEdit": false,
"name": "新增节点",
"children": [
{
"id": "427",
"isEdit": false,
"name": "123",
"children": []
}
]
},
{
"id": "414",
"isEdit": false,
"name": "12312",
"children": [
{
"id": "425",
"isEdit": false,
"name": "新增节点3",
"children": []
},
{
"id": "428",
"isEdit": false,
"name": "123123",
"children": []
}
]
}
]
}
]
},
{
"id": "307",
"isEdit": false,
"name": "222",
"children": [
{
"id": "413",
"isEdit": false,
"name": "新增节点",
"children": [
{
"id": "421",
"isEdit": false,
"name": "新增节点",
"children": []
}
]
},
{
获取树形结构的每一个节点的最后一个子节点
最新推荐文章于 2023-01-09 10:19:14 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)