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

阅读 23

2023-10-26

例如:

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

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)

0 0 举报