当前位置:网站首页>JS tile data lookup leaf node
JS tile data lookup leaf node
2022-07-04 15:14:00 【spring-java】
Go straight to the code
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
}
边栏推荐
- .Net之延迟队列
- LeetCode 35. 搜索插入位置 —vector遍历(O(logn)和O(n)的写法---二分查找法)
- Implementation of web chat room
- Quick introduction to automatic control principle + understanding
- 暑期复习,一定要避免踩这些坑!
- 一篇文章搞懂Go语言中的Context
- Intelligent customer service track: Netease Qiyu and Weier technology play different ways
- When synchronized encounters this thing, there is a big hole, pay attention!
- Leetcode 1200 minimum absolute difference [sort] The Path of leetcode for heroding
- C1 certification learning notes 3 -- Web Foundation
猜你喜欢
flutter 报错 No MediaQuery widget ancestor found.
Techsmith Camtasia Studio 2022.0.2屏幕录制软件
暑期复习,一定要避免踩这些坑!
LeetCode 1200 最小絕對差[排序] HERODING的LeetCode之路
Optimization method of deep learning neural network
Halcon knowledge: NCC_ Model template matching
這幾年爆火的智能物聯網(AIoT),到底前景如何?
Unity动画Animation Day05
Leecode learning notes - Joseph problem
Deep learning neural network case (handwritten digit recognition)
随机推荐
进制乱炖
Summer Review, we must avoid stepping on these holes!
Halcon knowledge: NCC_ Model template matching
Temperature control system based on max31865
LeetCode 1184. Distance between bus stops -- vector clockwise and counterclockwise
Luo Gu - some interesting questions 2
【大连理工大学】考研初试复试资料分享
PLC Analog input analog conversion FC s_ ITR (CoDeSys platform)
[differential privacy and data adaptability] differential privacy code implementation series (XIV)
Preliminary exploration of flask: WSGI
信号处理之一阶RC低通滤波器宏指令实现(繁易触摸屏)
浮点数如何与0进行比较?
03-存储系统
Exploration and practice of eventbridge in the field of SaaS enterprise integration
Cann operator: using iterators to efficiently realize tensor data cutting and blocking processing
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
AI做题水平已超过CS博士?
Redis sentinel mode realizes one master, two slave and three Sentinels
What is the future of the booming intelligent Internet of things (aiot) in recent years?
Unity脚本介绍 Day01