As was pointed out by @robin-zigmond, you are dealing with an object here containing array properties.
You can use the delete operator to delete properties from an object:
for (let prop in arr) {
if (arr[prop].length === 0) {
delete arr[prop];
}
}
This will remove all zero-length properties from the arr object.