I want to push all volume to arrayVolume but can't. In my opinion the problem is asynchronous. But I search, read document but can't do it run correct. Please help me solve the code if you can. That is my gratitude to you. Many thanks!
function kl(data){
    var arrayVolume = [];
    for(var key in data){
        var dbId = data[key];
        viewer.getProperties(dbId, function(e){
            var propertiesObj = e.properties;
            propertiesObj.forEach(myF);
            function myF(obj){
                if(obj.displayName === "Volume"){
                    var volume = obj.displayValue;
                    arrayVolume.push(volume);
                }
            }
        });
    }
    alert(arrayVolume);
}
 
     
    