0
点赞
收藏
分享

微信扫一扫

asp.net网上商城系统VS开发sqlserver数据库web结构c#编程Microsoft Visual Studio协同过滤设计

千妈小语 2023-10-26 阅读 23

例如:

这是递归对树形结构的遍历

findMatchingValue(json1,json2){

        if(json1.defaultLabel&&json2.some(item=>item.title==json1.defaultLabel)){

                //将匹配的值保存起来

                this.matchedValue.push(json1.defaultLabel)

        }

        if(json1.childrens&&json1.childrens.length>0){

                json1.childrens.forEach(child=>{  

                         this.findMatchingValue(child,json2)  

                })

        }        

}

举报

相关推荐

0 条评论