急求!!!!获取对象数组中符合条件的key值大佬们有什么好的建议?

不知道怎么写了,求帮助。
[
{
"pid":"0",
"name":"智慧定位",
"level":"1",
"industry_id":"37",
"scene":[
{
"pid":"37",
"name":"公车监管",
"level":"2",
"scene_id":"38"
}
]
},
{
"pid":"0",
"name":"智慧工地",
"icon":"",
"level":"1",
"industry_id":"39",
"scene":[
{
"pid":"39",
"name":"智能安全帽",
"icon":"",
"level":"2",
"scene_id":"40"
},
{
"pid":"39",
"name":"智慧工地-综合",
"icon":"",
"level":"2",
"scene_id":"41"
}
]
}
]
想知道scene_id为41的对象的industry_id
开满天机
浏览 303回答 2
2回答

婷婷同学_

functionfindID(arr){letid;arr.forEach(value=>{for(keyinvalue){if(key=='scene'){for(leti=0;i
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript