当前位置:网站首页>js平铺数据查找叶子节点
js平铺数据查找叶子节点
2022-07-04 14:00:00 【spring-java】
直接上代码
function chooseLeafNode(id,parentId,list=[]){
let treeData=[]
for(let i=0;i<list.length;i++){
let isLeavel=true
for(let j=0;j<list.length;j++){
if(list[i][id]==list[j][id]){
continue
}
if(list[i][id]==list[j][parentId]){
isLeavel=false
break
}
}
if(isLeavel){
treeData.push(list[i])
}
}
return treeData
}
边栏推荐
- LVGL 8.2 Menu
- Deep learning network regularization
- Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
- LVGL 8.2 keyboard
- TechSmith Camtasia studio 2022.0.2 screen recording software
- 微博、虎牙挺进兴趣社区:同行不同路
- 如何搭建一支搞垮公司的技术团队?
- Ranking list of databases in July: mongodb and Oracle scores fell the most
- %s格式符
- When synchronized encounters this thing, there is a big hole, pay attention!
猜你喜欢
TechSmith Camtasia studio 2022.0.2 screen recording software
Korean AI team plagiarizes shock academia! One tutor with 51 students, or plagiarism recidivist
SAIC Maxus officially released its new brand "mifa", and its flagship product mifa 9 was officially unveiled!
Preliminary exploration of flask: WSGI
leecode学习笔记-约瑟夫问题
When synchronized encounters this thing, there is a big hole, pay attention!
Redis 發布和訂閱
03 storage system
大神详解开源 BUFF 增益攻略丨直播
Leecode learning notes - Joseph problem
随机推荐
金额计算用 BigDecimal 就万无一失了?看看这五个坑吧~~
PLC模拟量输入 模拟量转换FC S_ITR (CODESYS平台)
Deep learning 7 transformer series instance segmentation mask2former
进制形式
LVLG 8.2 circular scrolling animation of a label
IO flow: node flow and processing flow are summarized in detail.
Five minutes per day machine learning: use gradient descent to complete the fitting of multi feature linear regression model
内存管理总结
Exploration and practice of eventbridge in the field of SaaS enterprise integration
宽度精度
Preliminary exploration of flask: WSGI
Introduction to modern control theory + understanding
LVGL 8.2 List
Redis 解决事务冲突之乐观锁和悲观锁
Ranking list of databases in July: mongodb and Oracle scores fell the most
hexadecimal
Programmers exposed that they took private jobs: they took more than 30 orders in 10 months, with a net income of 400000
如何搭建一支搞垮公司的技术团队?
Opencv learning notes - linear filtering: box filtering, mean filtering, Gaussian filtering
Halo effect - who says that those with light on their heads are heroes