I have an array of nested objects that represent Filesystem Hierarchy. I would like to sort my objects in every level in a way that folders come first, followed by files and pre