console
let productions = [{
"children": [{
"children": [{
"label": "55Q1R",
"value": "55Q1R"
}],
"label": "ZLM50HiS",
"value": "ZLM50HiS"
}],
"label": "5327",
"value": "5327"
}, {
"children": [{
"label": "ZLM60HiS2",
"value": "ZLM60HiS2"
}],
"label": "5508",
"value": "5508"
}];
function selectArr(arr,selected = [],result=[]){
arr.forEach(item=>{
if(item.value){
result.push([...selected,item.value].join('/'))
}
if(item.children){
selectArr(item.children,[...selected,item.value],result)
}
})
return result
}
document.getElementById('tt').append(selectArr(productions))
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Document</title>
</head>
<body>
<div id="tt">
</div>
</body>
</html>