I'd like to list things without names last (probably everything has a name so it doesn't really matter) ... very cheap way of doing this would be to change the above to

    var sortKey = entityName.toLowerCase() + "~~~" + id.toLowerCase();