How to batch delete folders in Notes?

And suddenly after a couple keystrokes and clicks, I managed to import over hundred folders with only a title and no content. Whatever I was doing, it was a mistake. Sample attached!

And now to removing them all!
There appears to be no way, in macOS Sonoma or iOS 17 or iCloud.com to select folders and batch delete them. Or is there?

I look forward to hearing from you.

Cheers
Neil

If I could search for folders with no content and then batch delete them, that would be sweet.