The code below will allow me to walk straight down a path to the bottom of a set of folders Datacenter->Folder Level1->Folder Level2.
I need to walk sideways... I want to look at the next folder at Level1 in the same Datacenter. The vmFolder given at the datacenter is on an Array type, and there is no "link-list" type chain to follow.
var datacenter_vcFolder = datacenter.vmFolder;
System.log("vmFolder:"+datacenter_vcFolder);
for (var i in datacenter_vcFolder) {
System.log("Name["+i+"]:"+datacenter_vcFolder[i].name);
var I_childType = datacenter_vcFolder[i].childType;
var I_childEntity = datacenter_vcFolder[i].childEntity;
for (var j in I_childType){
System.log("childType["+j+"]:"+I_childType[j]);
System.log("childEntity["+j+"]:"+I_childEntity[j]);
}
}