functiongetUrlArrayByFileType(jsonObj,type:string):string[]{
console.log(`getUrlArrayByFileType`)if(!jsonObj){
console.log('jsonObj is null , please check your json!!!')return}let urls:string[]=[]let len = type.length
functiontraverseJson(obj){//遍历json对象for(let o in obj){if(typeof(obj[o])==='object'){traverseJson(obj[o])}elseif(typeof(obj[o])==='string'){
console.log(`${o} = ${obj[o]}`)//根据type筛选想要的urlif(obj[o].slice(-len,obj[o].length)=== type){
urls.push(obj[o])}}}}traverseJson(jsonObj)return urls
}