Js traversal array

    var testData = 
            { 
            "10.1.181.128": [ 
                    { 
                    "fileCount": 121, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "vspp" 
                    }, 
                    { 
                    "fileCount": 1245, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "vspp" 
                    }, 
                    { 
                    "fileCount": 232, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "" 
                    }, 
                    { 
                    "fileCount": 23, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "" 
                    } 
                ], 
                    "10.1.181.126": [ 
                    { 
                    "fileCount": 58, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "vspp" 
                    }, 
                    { 
                    "fileCount": 1755, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "vspp" 
                    }, 
                    { 
                    "fileCount": 7, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "" 
                    }, 
                    { 
                    "fileCount": 7, 
                    "fileSize": 0, 
                    "processResult": "", 
                    "statItem": "" 
                    } 
                    ]
                 ] 
               } 
               

want to get the array of fileCount of vspp, etc. [121pc58]
want to get the array of fileCount of vspp preprocessing engine, etc. [XX,XX]
want to get the array of fileCount of key tone detection engine, etc. [XX,XX]
want to get the array of fileCount of voiceprint recognition engine, etc. [XX,XX]

Mar.16,2022

        let vspp=[];//vspp
        let vsppycl=[];//vspp
        let ajy=[];//
        let sw=[];//
        Object.keys(testData).forEach(key => {
            testData[key].map((item,index) => {
                if(item.statItem=='vspp') vspp.push(item.fileCount);
                if(item.statItem=='vspp') vsppycl.push(item.fileCount);
                if(item.statItem=='') ajy.push(item.fileCount);
                if(item.statItem=='') sw.push(item.fileCount);
            })
        });
        console.log(vspp,vsppycl,ajy,sw);

in order to make it easy to understand, this method of writing should be easy to understand


var keyW = ['vspp','vspp','',''];
var obj={};
for(var k in testData){
  for(var i=0;i<testData[k].length;iPP){
    if(!obj[keyW[i]])  obj[keyW[i]] = [];
    var key = testData[k][i];
    if(obj[key.statItem])
     obj[key.statItem].push(key.fileCount);
  }
}
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b372c8-2c08c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b372c8-2c08c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?