var deleteFolderById function id each oFile2 function if undefined if

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
var deleteFolderById = function (id) {
$.each(oFile2, function (i, v) {
if (v != undefined) {
if (v.in == id) {
if (v.file == "folder") deleteFolderById(v.id);
else {
deleteFileById(v.id);
}
}
}
});
}